diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-07 02:46:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 12:20:15 +0200 |
commit | 89e26447fa874cd8ded96f9170525d53a01433d3 (patch) | |
tree | f00ab0a07929151f2e9a84ecef5185f0d52a111c | |
parent | 207f2874c0758c87bc66e6e4ee34452cf43827bf (diff) | |
download | ffmpeg-89e26447fa874cd8ded96f9170525d53a01433d3.tar.gz |
avcodec/msmpeg4dec: Correct table depth
Fixes undefined shift
Fixes: 1381/clusterfuzz-testcase-minimized-5513944540119040
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1121d9270783b284a70af317d8785eac7df1b72f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/msmpeg4dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 77e8509f9d..b464092d88 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -140,7 +140,7 @@ static int msmpeg4v12_decode_mb(MpegEncContext *s, int16_t block[6][64]) if(s->msmpeg4_version==2) cbp= get_vlc2(&s->gb, v2_intra_cbpc_vlc.table, V2_INTRA_CBPC_VLC_BITS, 1); else - cbp= get_vlc2(&s->gb, ff_h263_intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 1); + cbp= get_vlc2(&s->gb, ff_h263_intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2); if(cbp<0 || cbp>3){ av_log(s->avctx, AV_LOG_ERROR, "cbpc %d invalid at %d %d\n", cbp, s->mb_x, s->mb_y); return -1; |