diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index f16a5082c5..4f4aa9aea8 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -214,6 +214,7 @@ static inline int get_xbits(GetBitContext *s, int n) register int sign; register int32_t cache; OPEN_READER(re, s); + av_assert2(n>0 && n<=25); UPDATE_CACHE(re, s); cache = GET_CACHE(re, s); sign = ~cache >> 31;