You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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:
@@ -137,6 +137,10 @@ static int mp_read_codes_table(MotionPixelsContext *mp, GetBitContext *gb)
|
|||||||
mp->current_codes_count = 0;
|
mp->current_codes_count = 0;
|
||||||
if ((ret = mp_get_code(mp, gb, 0, 0)) < 0)
|
if ((ret = mp_get_code(mp, gb, 0, 0)) < 0)
|
||||||
return ret;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user