Module: libav
Branch: master
Commit: 072756cdd2f949462520041e357f52f15d8c274d

Author:    Andreas Cadhalpun <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Thu Jun 25 22:54:17 2015 +0200

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 <[email protected]>
Signed-off-by: Luca Barbato <[email protected]>

---

 libavcodec/vc1dec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 53254f0..6b9713d 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);
         }

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to