summaryrefslogtreecommitdiff
path: root/libavcodec/get_bits.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-30 00:31:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-30 01:40:18 +0200
commitff130d7363e0b29ab3e5b46fa3647f236c3c7ba5 (patch)
tree278fe48bc6e9deae05a2a5c33754daf8d8edea78 /libavcodec/get_bits.h
parent68efb1d60a99184c7c04b4a87dbea960d373b12a (diff)
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>
Diffstat (limited to 'libavcodec/get_bits.h')
-rw-r--r--libavcodec/get_bits.h1
1 files changed, 1 insertions, 0 deletions
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;