mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
avcodec/truemotion1: Initialize mb_change_byte only when needed
Fixes out of array read Fixes: d92114d8c2a019b8a6e50cd2a7301b54/asan_heap-oob_26bf563_60_1d3420277533de9dbf8aba3f93af346f.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a8b254e436
commit
a813cdda48
@ -645,7 +645,8 @@ static void truemotion1_decode_16bit(TrueMotion1Context *s)
|
||||
current_pixel_pair = (unsigned int *)current_line;
|
||||
vert_pred = s->vert_pred;
|
||||
mb_change_index = 0;
|
||||
mb_change_byte = mb_change_bits[mb_change_index++];
|
||||
if (!keyframe)
|
||||
mb_change_byte = mb_change_bits[mb_change_index++];
|
||||
mb_change_byte_mask = 0x01;
|
||||
pixels_left = s->avctx->width;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user