dsicinav: fix signed integer overflow
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 31 Aug 2012 13:15:59 +0000 (15:15 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 31 Aug 2012 13:15:59 +0000 (15:15 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dsicinav.c

index bd585c3..1679bfe 100644 (file)
@@ -227,12 +227,12 @@ static int cinvideo_decode_frame(AVCodecContext *avctx,
         if (palette_colors_count > 256)
             return AVERROR_INVALIDDATA;
         for (i = 0; i < palette_colors_count; ++i) {
-            cin->palette[i] = 0xFF << 24 | bytestream_get_le24(&buf);
+            cin->palette[i] = 0xFFU << 24 | bytestream_get_le24(&buf);
             bitmap_frame_size -= 3;
         }
     } else {
         for (i = 0; i < palette_colors_count; ++i) {
-            cin->palette[buf[0]] = 0xFF << 24 | AV_RL24(buf+1);
+            cin->palette[buf[0]] = 0xFFU << 24 | AV_RL24(buf+1);
             buf += 4;
             bitmap_frame_size -= 4;
         }