[PATCH 0/1] MR11089: oleaut32: Take into account that SAFEARRAY element in an SLTG typelib uses 32-bit units.
From: Dmitry Timoshkov <dmitry@baikal.ru> Found while testing MR 10502 in 32-bit and 64-bit prefixes. Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> --- dlls/oleaut32/typelib.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index e9997a86d24..acc6868b724 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -3899,7 +3899,15 @@ static WORD *SLTG_DoType(WORD *pType, char *pBlk, TYPEDESC *pTD, const sltg_ref_ /* *(pType+1) is offset to a SAFEARRAY, *(pType+2) is type of array */ - SAFEARRAY *pSA = (SAFEARRAY *)(pBlk + *(++pType)); + struct SLTG_SAFEARRAY + { + short cDims; + short fFetures; + int cbElements; + int cLocks; + int pvData; + SAFEARRAYBOUND rgsabound[1]; + } *pSA = (struct SLTG_SAFEARRAY *)(pBlk + *(++pType)); pTD->vt = VT_CARRAY; pTD->lpadesc = calloc(1, sizeof(ARRAYDESC) + (pSA->cDims - 1) * sizeof(SAFEARRAYBOUND)); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11089
participants (2)
-
Dmitry Timoshkov -
Dmitry Timoshkov (@dmitry)