[FFmpeg-cvslog] avcodec/mpeg12dec: Do not call show_bits() with invalid bits
Michael Niedermayer
git at videolan.org
Thu Nov 26 01:54:08 CET 2015
ffmpeg | branch: release/2.4 | Michael Niedermayer <michael at niedermayer.cc> | Fri Nov 6 00:56:04 2015 +0100| [2ccab79595ae6a7653e503c82d5efc98a10f2be9] | committer: Andreas Cadhalpun
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 at niedermayer.cc>
(cherry picked from commit 973c3dba27d0b1a88c70f6661b6a90d2f2e50665)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2ccab79595ae6a7653e503c82d5efc98a10f2be9
---
libavcodec/mpeg12dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index d5e1fb6..5fb4739 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1907,7 +1907,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
(left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) ||
((avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_AGGRESSIVE)) && left > 8)) {
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;
} else
goto eos;
More information about the ffmpeg-cvslog
mailing list