gif: fix invalid signed shifts
authorMans Rullgard <mans@mansr.com>
Fri, 25 Nov 2011 17:51:10 +0000 (17:51 +0000)
committerMans Rullgard <mans@mansr.com>
Sat, 26 Nov 2011 11:38:40 +0000 (11:38 +0000)
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/gifdec.c

index bf40da1..9bac254 100644 (file)
@@ -96,11 +96,11 @@ static int gif_read_image(GifState *s)
     n = (1 << bits_per_pixel);
     spal = palette;
     for(i = 0; i < n; i++) {
     n = (1 << bits_per_pixel);
     spal = palette;
     for(i = 0; i < n; i++) {
-        s->image_palette[i] = (0xff << 24) | AV_RB24(spal);
+        s->image_palette[i] = (0xffu << 24) | AV_RB24(spal);
         spal += 3;
     }
     for(; i < 256; i++)
         spal += 3;
     }
     for(; i < 256; i++)
-        s->image_palette[i] = (0xff << 24);
+        s->image_palette[i] = (0xffu << 24);
     /* handle transparency */
     if (s->transparent_color_index >= 0)
         s->image_palette[s->transparent_color_index] = 0;
     /* handle transparency */
     if (s->transparent_color_index >= 0)
         s->image_palette[s->transparent_color_index] = 0;