mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-03 11:07:41 +00:00
avcodec/mpeg12dec: Do not call show_bits() with invalid bits
Fixes assertion failure
Fixes: 63e50545709a6440d3d59f6426d58db9/signal_sigabrt_7ffff6ae7cc9_8189_3272a3010fd98ddf947c662bbde1ac13.ts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 973c3dba27
)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
parent
458b1fda34
commit
2ccab79595
@ -1907,7 +1907,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
|
|||||||
(left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) ||
|
(left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) ||
|
||||||
((avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_AGGRESSIVE)) && left > 8)) {
|
((avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_AGGRESSIVE)) && left > 8)) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n",
|
av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n",
|
||||||
left, show_bits(&s->gb, FFMIN(left, 23)));
|
left, left>0 ? show_bits(&s->gb, FFMIN(left, 23)) : 0);
|
||||||
return -1;
|
return -1;
|
||||||
} else
|
} else
|
||||||
goto eos;
|
goto eos;
|
||||||
|
Loading…
Reference in New Issue
Block a user