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@gmx.at>
pull/87/head
Michael Niedermayer 10 years ago
parent 1acc9189b4
commit 9db9b209e3
  1. 2
      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;

Loading…
Cancel
Save