From 9db9b209e3a32ecce93378a24fb931d7db35b1c2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 8 Oct 2014 04:12:26 +0200 Subject: [PATCH] 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 --- libavcodec/mmvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index 9ff6393aec..9a7c10c3ab 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;