Dmitry Timoshkov : windowscodecs: Fix IWICBitmapDecoder::CopyPalette for a not initialized case in the GIF decoder.

Alexandre Julliard julliard at winehq.org
Mon Apr 27 15:19:31 CDT 2020


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Apr 27 10:32:38 2020 +0800

windowscodecs: Fix IWICBitmapDecoder::CopyPalette for a not initialized case in the GIF decoder.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/windowscodecs/gifformat.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c
index fc8f4b1c3e..5d5a3a07a2 100644
--- a/dlls/windowscodecs/gifformat.c
+++ b/dlls/windowscodecs/gifformat.c
@@ -1187,6 +1187,9 @@ static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, IWICPalet
 
     TRACE("(%p,%p)\n", iface, palette);
 
+    if (!This->gif)
+        return WINCODEC_ERR_WRONGSTATE;
+
     cm = This->gif->SColorMap;
     if (cm)
     {




More information about the wine-cvs mailing list