[FFmpeg-cvslog] get_xbits: assert validity of the number of bits
Michael Niedermayer
git at videolan.org
Sun Jun 30 01:41:32 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 30 00:31:51 2013 +0200| [ff130d7363e0b29ab3e5b46fa3647f236c3c7ba5] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff130d7363e0b29ab3e5b46fa3647f236c3c7ba5
---
libavcodec/get_bits.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index f16a508..4f4aa9a 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;
More information about the ffmpeg-cvslog
mailing list