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

This commit is contained in:
Huw Davies 2006-05-08 17:24:51 +01:00 committed by Alexandre Julliard
parent 1c6f16a384
commit df40c966a0
2 changed files with 2 additions and 5 deletions

View File

@ -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);

View File

@ -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);