]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mmvideo: Fix undefined behavior (left shift of negative value)
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Oct 2014 02:12:26 +0000 (04:12 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Oct 2014 03:35:01 +0000 (05:35 +0200)
Fixes: asan_heap-oob_4da4f3_8_asan_heap-oob_4da4f3_419_scene1a.mm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mmvideo.c

index 9ff6393aec7062933e31ea2cee6be0760aa2e6b4..9a7c10c3ab80d0579dd04398eafd62063c010535 100644 (file)
@@ -49,7 +49,7 @@
 typedef struct MmContext {
     AVCodecContext *avctx;
     AVFrame *frame;
-    int palette[AVPALETTE_COUNT];
+    unsigned int palette[AVPALETTE_COUNT];
     GetByteContext gb;
 } MmContext;