aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-12-18 10:06:29 +0100
committerPaul B Mahol <onemda@gmail.com>2016-12-18 10:06:29 +0100
commit14090b70502968efc2e393a8d2dfc06e32558897 (patch)
tree2edb678889dba20280011d49d50df1eed46b0a1b
parent38a13155827b5ab3af1fd44f5963de96b496544c (diff)
downloadffmpeg-14090b70502968efc2e393a8d2dfc06e32558897.tar.gz
avcodec/get_bits: add av_assert2 to get_bits_long()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-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 e8888419b5..c094a14caa 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -331,6 +331,7 @@ static inline void skip_bits1(GetBitContext *s)
*/
static inline unsigned int get_bits_long(GetBitContext *s, int n)
{
+ av_assert2(n>=0 && n<=32);
if (!n) {
return 0;
} else if (n <= MIN_CACHE_BITS) {