Commit 8122173a authored by Mike Hearn's avatar Mike Hearn Committed by Alexandre Julliard

gdi: Protect GetEnhMetaFilePaletteEntries against bad handles.

parent 679df54b
......@@ -2571,6 +2571,8 @@ UINT WINAPI GetEnhMetaFilePaletteEntries( HENHMETAFILE hEmf,
TRACE( "(%p,%d,%p)\n", hEmf, cEntries, lpPe );
if (!enhHeader) return 0;
/* First check if there are any palettes associated with
this metafile. */
if ( enhHeader->nPalEntries == 0 ) return 0;
......
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