From 14090b70502968efc2e393a8d2dfc06e32558897 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 18 Dec 2016 10:06:29 +0100 Subject: [PATCH] avcodec/get_bits: add av_assert2 to get_bits_long() Signed-off-by: Paul B Mahol --- libavcodec/get_bits.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index e8888419b5..c094a14caa 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -331,6 +331,7 @@ static inline void skip_bits1(GetBitContext *s) */ static inline unsigned int get_bits_long(GetBitContext *s, int n) { + av_assert2(n>=0 && n<=32); if (!n) { return 0; } else if (n <= MIN_CACHE_BITS) {