ole32: Allocate copied VT_CF data correctly in PropVariantCopy.
This commit is contained in:
parent
5f5b90914d
commit
704dffcb09
|
@ -2699,6 +2699,9 @@ HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
|
|||
if (pvarSrc->u.pclipdata)
|
||||
{
|
||||
len = pvarSrc->u.pclipdata->cbSize - sizeof(pvarSrc->u.pclipdata->ulClipFmt);
|
||||
pvarDest->u.pclipdata = CoTaskMemAlloc(sizeof (CLIPDATA));
|
||||
pvarDest->u.pclipdata->cbSize = pvarSrc->u.pclipdata->cbSize;
|
||||
pvarDest->u.pclipdata->ulClipFmt = pvarSrc->u.pclipdata->ulClipFmt;
|
||||
pvarDest->u.pclipdata->pClipData = CoTaskMemAlloc(len);
|
||||
CopyMemory(pvarDest->u.pclipdata->pClipData, pvarSrc->u.pclipdata->pClipData, len);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue