mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/vc1_block: Fix mqaunt check for negative values
Fixes: out of array access Fixes: ffmpeg_bof_4.avi Fixes: ffmpeg_bof_5.avi Fixes: ffmpeg_bof_6.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Reviewed-by: Jerome Borsboom <jerome.borsboom@carpalis.nl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5a99e00023
commit
d08d4a8c73
@ -207,7 +207,7 @@ static void vc1_put_blocks_clamped(VC1Context *v, int put_signed)
|
||||
if ((edges&8) && \
|
||||
s->mb_y == ((s->mb_height >> v->field_mode) - 1)) \
|
||||
mquant = -v->altpq; \
|
||||
if (!mquant || mquant > 31) { \
|
||||
if (!mquant || mquant > 31 || mquant < -31) { \
|
||||
av_log(v->s.avctx, AV_LOG_ERROR, \
|
||||
"Overriding invalid mquant %d\n", mquant); \
|
||||
mquant = 1; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user