Skip to content
Snippets Groups Projects
Commit b6da3547 authored by Esme Povirk's avatar Esme Povirk Committed by Alexandre Julliard
Browse files

gdi32: Check that emf records are within the file.

parent 8d2676fd
Branches
Tags
No related merge requests found
......@@ -2470,6 +2470,14 @@ BOOL WINAPI EnumEnhMetaFile(
{
emr = (ENHMETARECORD *)((char *)emh + offset);
if (offset + 8 > emh->nBytes ||
offset > offset + emr->nSize ||
offset + emr->nSize > emh->nBytes)
{
WARN("record truncated\n");
break;
}
/* In Win9x mode we update the xform if the record will produce output */
if (hdc && IS_WIN9X() && emr_produces_output(emr->iType))
EMF_Update_MF_Xform(hdc, info);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment