mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
GetMetaFile checks both the version and the header size when it tries
to load a metafile. Powerpoint XP depends on this.
This commit is contained in:
parent
e8cafa5799
commit
82977c1441
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue