mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 10:31:53 +00:00
oleaut32: Allocate a full pointer when unmarshalling byref arrays.
Instead of the 4 bytes array wire size returned by get_type_size, which will truncate the pointer on 64-bit. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54562
This commit is contained in:
parent
3e82dc30e2
commit
76e7f030fe
|
@ -1514,7 +1514,6 @@ static void test_marshal_VARIANT(void)
|
||||||
SafeArrayGetVartype(*V_ARRAYREF(&v2), &vt2);
|
SafeArrayGetVartype(*V_ARRAYREF(&v2), &vt2);
|
||||||
ok(vt == vt2, "array vts differ %x %x\n", vt, vt2);
|
ok(vt == vt2, "array vts differ %x %x\n", vt, vt2);
|
||||||
size = IMalloc_GetSize(allocator, V_BYREF(&v2));
|
size = IMalloc_GetSize(allocator, V_BYREF(&v2));
|
||||||
todo_wine_if(sizeof(void *) == 8)
|
|
||||||
ok(size == sizeof(V_ARRAY(&v2)), "got size %#Ix\n", size);
|
ok(size == sizeof(V_ARRAY(&v2)), "got size %#Ix\n", size);
|
||||||
VARIANT_UserFree(&umcb.Flags, &v2);
|
VARIANT_UserFree(&umcb.Flags, &v2);
|
||||||
HeapFree(GetProcessHeap(), 0, oldbuffer);
|
HeapFree(GetProcessHeap(), 0, oldbuffer);
|
||||||
|
|
|
@ -506,7 +506,10 @@ unsigned char * WINAPI VARIANT_UserUnmarshal(ULONG *pFlags, unsigned char *Buffe
|
||||||
ULONG mem_size;
|
ULONG mem_size;
|
||||||
Pos += 4;
|
Pos += 4;
|
||||||
|
|
||||||
switch (header->vt & ~VT_BYREF)
|
/* byref array needs to allocate a SAFEARRAY pointer */
|
||||||
|
if (header->vt & VT_ARRAY)
|
||||||
|
mem_size = sizeof(void *);
|
||||||
|
else switch (header->vt & ~VT_BYREF)
|
||||||
{
|
{
|
||||||
/* these types have a different memory size compared to wire size */
|
/* these types have a different memory size compared to wire size */
|
||||||
case VT_UNKNOWN:
|
case VT_UNKNOWN:
|
||||||
|
|
Loading…
Reference in a new issue