Vincent Povirk : gdiplus: Return an error retrieving the palette for a metafile.

Alexandre Julliard julliard at winehq.org
Fri May 15 16:55:06 CDT 2020


Module: wine
Branch: master
Commit: 8b9cff6e7083042e46ee28cffa89a97c53d3a9a6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8b9cff6e7083042e46ee28cffa89a97c53d3a9a6

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Thu May 14 20:51:10 2020 -0500

gdiplus: Return an error retrieving the palette for a metafile.

Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/image.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 17cccf2b42..cafe69d8f4 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




More information about the wine-cvs mailing list