avcodec/movtextdec: Make tx3g_ptr unsigned
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 31 Aug 2015 21:01:23 +0000 (23:01 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 31 Aug 2015 21:44:39 +0000 (23:44 +0200)
Fixes integer overflow
Fixes: efe937780e95574250dabe07151bdc23/unknown_unknown_351_849_cov_3187578556_shellymanne.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/movtextdec.c

index 8f1015a..bdef856 100644 (file)
@@ -132,7 +132,7 @@ static void mov_text_cleanup_ftab(MovTextContext *m)
 
 static int mov_text_tx3g(AVCodecContext *avctx, MovTextContext *m)
 {
-    char *tx3g_ptr = avctx->extradata;
+    uint8_t *tx3g_ptr = avctx->extradata;
     int i, box_size, font_length;
     int8_t v_align, h_align;
     int style_fontID;