mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
ole32: Allocate copied VT_CF data correctly in PropVariantCopy.
This commit is contained in:
parent
5f5b90914d
commit
704dffcb09
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue