Commit df40c966 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

oleaut32: Preserve the 'auto' features before copying over the masked unmarshaled ones.

parent 1c6f16a3
......@@ -181,9 +181,7 @@ static void test_marshal_LPSAFEARRAY(void)
ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal\n");
SafeArrayGetVartype(lpsa, &vt);
SafeArrayGetVartype(lpsa2, &vt2);
todo_wine {
ok(vt == vt2, "vts differ %x %x\n", vt, vt2);
}
LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2);
}
HeapFree(GetProcessHeap(), 0, buffer);
......@@ -865,9 +863,7 @@ static void test_marshal_VARIANT(void)
ok(bound == bound2, "array ubounds differ\n");
SafeArrayGetVartype(V_ARRAY(&v), &vt);
SafeArrayGetVartype(V_ARRAY(&v2), &vt2);
todo_wine {
ok(vt == vt2, "array vts differ %x %x\n", vt, vt2);
}
VARIANT_UserFree(&umcb.Flags, &v2);
}
HeapFree(GetProcessHeap(), 0, buffer);
......
......@@ -1004,7 +1004,8 @@ unsigned char * WINAPI LPSAFEARRAY_UserUnmarshal(unsigned long *pFlags, unsigned
/* be careful about which flags we set since they could be a security
* risk */
(*ppsa)->fFeatures = wiresa->fFeatures & ~(FADF_AUTOSETFLAGS);
(*ppsa)->fFeatures &= FADF_AUTOSETFLAGS;
(*ppsa)->fFeatures |= (wiresa->fFeatures & ~(FADF_AUTOSETFLAGS));
/* FIXME: there should be a limit on how large wiresa->cbElements can be */
(*ppsa)->cbElements = wiresa->cbElements;
(*ppsa)->cLocks = LOWORD(wiresa->cLocks);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment