Commit ff130d73 authored by Michael Niedermayer's avatar Michael Niedermayer

get_xbits: assert validity of the number of bits

similar is already done in the other get_bits() functions
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 68efb1d6
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment