diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-06 00:56:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-12 02:55:47 +0100 |
commit | b0b1b208f5c7cd783b58cd1527f65b20ff550ffe (patch) | |
tree | 76b7106f169c4b8c8de52b95f2f0a6a807b57ab4 | |
parent | 6acf5ff1d3c5bb3cfcaa1847f8c26e3e3aead1bc (diff) | |
download | ffmpeg-b0b1b208f5c7cd783b58cd1527f65b20ff550ffe.tar.gz |
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 973c3dba27d0b1a88c70f6661b6a90d2f2e50665)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/mpeg12dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 00ce2a4496..fdb93e3cdc 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1928,7 +1928,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 AVERROR_INVALIDDATA; } else goto eos; |