[PATCH 2/3] gdiplus: Return an error retrieving the palette for a metafile.
14 May
2020
14 May
'20
8:51 p.m.
From: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> --- dlls/gdiplus/image.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 17cccf2b427..cafe69d8f43 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -2285,6 +2285,12 @@ GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage *image, INT *size) if(!image || !size) return InvalidParameter; + if (image->type == ImageTypeMetafile) + { + *size = 0; + return GenericError; + } + if (!image->palette || image->palette->Count == 0) *size = sizeof(ColorPalette); else -- 2.17.1
2034
Age (days ago)
2034
Last active (days ago)
0 comments
1 participants
participants (1)
-
Esme Povirk