Browse code

get_xbits: assert validity of the number of bits

similar is already done in the other get_bits() functions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2013/06/30 07:31:51
Showing 1 changed files
... ...
@@ -214,6 +214,7 @@ static inline int get_xbits(GetBitContext *s, int n)
214 214
     register int sign;
215 215
     register int32_t cache;
216 216
     OPEN_READER(re, s);
217
+    av_assert2(n>0 && n<=25);
217 218
     UPDATE_CACHE(re, s);
218 219
     cache = GET_CACHE(re, s);
219 220
     sign  = ~cache >> 31;