Instead of the 4 bytes array wire size returned by get_type_size, which will truncate the pointer on 64-bit.
From: Rémi Bernon rbernon@codeweavers.com
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 --- dlls/oleaut32/usrmarshal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/oleaut32/usrmarshal.c b/dlls/oleaut32/usrmarshal.c index aa54a2b092b..7f6b70638ac 100644 --- a/dlls/oleaut32/usrmarshal.c +++ b/dlls/oleaut32/usrmarshal.c @@ -506,7 +506,10 @@ unsigned char * WINAPI VARIANT_UserUnmarshal(ULONG *pFlags, unsigned char *Buffe ULONG mem_size; Pos += 4;
- switch (header->vt & ~VT_BYREF) + /* byref array needs to allocate a LPSAFEARRAY 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 */ case VT_UNKNOWN:
Could we perhaps add a test for this? See test_marshal_VARIANT().