Gerald Pfeifer : gdiplus: Avoid shift overflow in get_gif_background_color.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Oct 29 09:32:12 CDT 2015


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

Author: Gerald Pfeifer <gerald at pfeifer.com>
Date:   Mon Oct 19 22:06:42 2015 +0200

gdiplus: Avoid shift overflow in get_gif_background_color.

Signed-off-by: Gerald Pfeifer <gerald at pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 53ace05..f803efa 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -3838,7 +3838,7 @@ static DWORD get_gif_background_color(GpBitmap *bitmap)
         if(bitmap->prop_item[i].id == PropertyTagGlobalPalette) {
             if(bitmap->prop_item[i].length/3 > bgcolor_idx) {
                 BYTE *color = ((BYTE*)bitmap->prop_item[i].value)+bgcolor_idx*3;
-                return color[2] + (color[1]<<8) + (color[0]<<16) + (0xff<<24);
+                return color[2] + (color[1]<<8) + (color[0]<<16) + (0xffu<<24);
             }
             break;
         }




More information about the wine-cvs mailing list