Commit 4fac4588 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdi32/emf: Check for allocation failure in GdiComment().

parent 47a939e2
......@@ -2522,6 +2522,9 @@ BOOL WINAPI GdiComment( HDC hdc, UINT bytes, const BYTE *buffer )
total = offsetof(EMRGDICOMMENT,Data) + aligned_size(bytes);
emr = HeapAlloc(GetProcessHeap(), 0, total);
if (!emr)
return FALSE;
emr->emr.iType = EMR_GDICOMMENT;
emr->emr.nSize = total;
emr->cbData = bytes;
......
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