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,
|
static HRESULT _VarChangeTypeExWrap (VARIANTARG* pvargDest,
|
||||||
VARIANTARG* pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
|
VARIANTARG* pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
|
||||||
{
|
{
|
||||||
HRESULT res;
|
VARIANTARG vtmpsrc = *pvargSrc;
|
||||||
VARTYPE flags;
|
|
||||||
|
|
||||||
flags = V_VT(pvargSrc) & ~VT_TYPEMASK;
|
V_VT(&vtmpsrc) &= ~VT_RESERVED;
|
||||||
V_VT(pvargSrc) &= ~VT_RESERVED;
|
return VariantChangeTypeEx(pvargDest,&vtmpsrc,lcid,wFlags,vt);
|
||||||
res = VariantChangeTypeEx(pvargDest,pvargSrc,lcid,wFlags,vt);
|
|
||||||
V_VT(pvargSrc) |= flags;
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue