Commit 82977c14 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

GetMetaFile checks both the version and the header size when it tries

to load a metafile. Powerpoint XP depends on this.
parent e8cafa57
...@@ -245,6 +245,10 @@ static METAHEADER *MF_ReadMetaFile(HANDLE hfile) ...@@ -245,6 +245,10 @@ static METAHEADER *MF_ReadMetaFile(HANDLE hfile)
HeapFree( GetProcessHeap(), 0, mh ); HeapFree( GetProcessHeap(), 0, mh );
return NULL; return NULL;
} }
if(mh->mtVersion != MFVERSION || mh->mtHeaderSize != size / 2) {
HeapFree( GetProcessHeap(), 0, mh );
return NULL;
}
size = mh->mtSize * 2; size = mh->mtSize * 2;
mh = HeapReAlloc( GetProcessHeap(), 0, mh, size ); mh = HeapReAlloc( GetProcessHeap(), 0, mh, size );
if(!mh) return NULL; if(!mh) return NULL;
......
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