diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index 1e890f9eb3d..3a8be57b5ae 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -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); }