motionpixels: Check that the vlc table has been fully inited
Fixes out of array reads Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4401958fdc
commit
b5fc95e77f
@ -137,6 +137,10 @@ static int mp_read_codes_table(MotionPixelsContext *mp, GetBitContext *gb)
|
||||
mp->current_codes_count = 0;
|
||||
if ((ret = mp_get_code(mp, gb, 0, 0)) < 0)
|
||||
return ret;
|
||||
if (mp->current_codes_count < mp->codes_count) {
|
||||
av_log(mp->avctx, AV_LOG_ERROR, "too few codes\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user