Commit 1fcae3c2 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

gdi32: Handle HeapAlloc failure in SetEnhMetaFileBits (scan-build).

parent 0566ba9a
......@@ -480,7 +480,9 @@ HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT bufsize, const BYTE *buf)
{
ENHMETAHEADER *emh = HeapAlloc( GetProcessHeap(), 0, bufsize );
HENHMETAFILE hmf;
memmove(emh, buf, bufsize);
if (!emh) return 0;
memcpy(emh, buf, bufsize);
hmf = EMF_Create_HENHMETAFILE( emh, bufsize, FALSE );
if (!hmf)
HeapFree( GetProcessHeap(), 0, emh );
......
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