Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-06-25 23:47:38 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-23 02:33:48 +0300
commitfdf166c5d2bb0e0d1771cfabcdf66f3c3391cac2 (patch)
tree886edb3e06efe8fb89535127300d0c2e12dfad37
parent874b3117ed6222d620d380b3f0e20c176339cf68 (diff)
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> (cherry picked from commit 2e1226a695dd2faada939e0bdc3ee166b05c3579) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/vc1dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 70694471ce..d9bfbece02 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);
}