mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
oleaut32: Don't crash in wrapper if variant resides in read-only memory.
This commit is contained in:
parent
6d5be5033e
commit
fd543f5aa3
@ -2719,15 +2719,10 @@ HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out)
|
||||
static HRESULT _VarChangeTypeExWrap (VARIANTARG* pvargDest,
|
||||
VARIANTARG* pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
|
||||
{
|
||||
HRESULT res;
|
||||
VARTYPE flags;
|
||||
VARIANTARG vtmpsrc = *pvargSrc;
|
||||
|
||||
flags = V_VT(pvargSrc) & ~VT_TYPEMASK;
|
||||
V_VT(pvargSrc) &= ~VT_RESERVED;
|
||||
res = VariantChangeTypeEx(pvargDest,pvargSrc,lcid,wFlags,vt);
|
||||
V_VT(pvargSrc) |= flags;
|
||||
|
||||
return res;
|
||||
V_VT(&vtmpsrc) &= ~VT_RESERVED;
|
||||
return VariantChangeTypeEx(pvargDest,&vtmpsrc,lcid,wFlags,vt);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user