aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vc1dec.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>2015-06-25 22:54:17 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-06-26 19:39:29 +0200
commit072756cdd2f949462520041e357f52f15d8c274d (patch)
treed1b83019342bb950da320443add984e70bc8400a /libavcodec/vc1dec.c
parent5dbd491eb38efab1d1313d4129ed76ab2e98176d (diff)
downloadffmpeg-072756cdd2f949462520041e357f52f15d8c274d.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. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 53254f0949..6b9713d015 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -444,7 +444,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);
}