[FFmpeg-cvslog] avcodec/mmvideo: Fix undefined behavior (left shift of negative value)

Michael Niedermayer git at videolan.org
Wed Oct 8 05:39:55 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct  8 04:12:26 2014 +0200| [9db9b209e3a32ecce93378a24fb931d7db35b1c2] | committer: Michael Niedermayer

avcodec/mmvideo: Fix undefined behavior (left shift of negative value)

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9db9b209e3a32ecce93378a24fb931d7db35b1c2
---

 libavcodec/mmvideo.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 9ff6393..9a7c10c 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -49,7 +49,7 @@
 typedef struct MmContext {
     AVCodecContext *avctx;
     AVFrame *frame;
-    int palette[AVPALETTE_COUNT];
+    unsigned int palette[AVPALETTE_COUNT];
     GetByteContext gb;
 } MmContext;
 



More information about the ffmpeg-cvslog mailing list