diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-06-25 22:47:38 +0200 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-07-30 18:53:24 +0200 |
commit | 983dc64772a0d1ae621b48d926daa903171a718b (patch) | |
tree | 2b2583463f29fa50428597448d0fb0c26eb924f2 | |
parent | 98aedbf9fe38dac810cb94e3ee1217fad3088c53 (diff) | |
download | ffmpeg-983dc64772a0d1ae621b48d926daa903171a718b.tar.gz |
vc1dec: use get_bits_long and limit the read bits to 32
get_bits should not be used with more than 25 bits.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 1f1e0a2971b2a01f275bb5088c2e36166514be64)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r-- | libavcodec/vc1dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index da6724ca39..e5725b4b2a 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -465,7 +465,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) count = avctx->extradata_size*8 - get_bits_count(&gb); if (count > 0) { av_log(avctx, AV_LOG_INFO, "Extra data: %i bits left, value: %X\n", - count, get_bits(&gb, count)); + count, get_bits_long(&gb, FFMIN(count, 32))); } else if (count < 0) { av_log(avctx, AV_LOG_INFO, "Read %i bits in overflow\n", -count); } |