diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-06-30 00:31:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-06-30 01:40:18 +0200 |
commit | ff130d7363e0b29ab3e5b46fa3647f236c3c7ba5 (patch) | |
tree | 278fe48bc6e9deae05a2a5c33754daf8d8edea78 | |
parent | 68efb1d60a99184c7c04b4a87dbea960d373b12a (diff) | |
download | ffmpeg-ff130d7363e0b29ab3e5b46fa3647f236c3c7ba5.tar.gz |
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>
-rw-r--r-- | libavcodec/get_bits.h | 1 |
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; |