Commit fd543f5a authored by David Hedberg's avatar David Hedberg Committed by Alexandre Julliard

oleaut32: Don't crash in wrapper if variant resides in read-only memory.

parent 6d5be503
......@@ -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);
}
/**********************************************************************
......
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