[FFmpeg-cvslog] avcodec/get_bits: add av_assert2 to get_bits_long()

Paul B Mahol git at videolan.org
Sun Dec 18 11:08:00 EET 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Dec 18 10:06:29 2016 +0100| [14090b70502968efc2e393a8d2dfc06e32558897] | committer: Paul B Mahol

avcodec/get_bits: add av_assert2 to get_bits_long()

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=14090b70502968efc2e393a8d2dfc06e32558897
---

 libavcodec/get_bits.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index e888841..c094a14 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) {



More information about the ffmpeg-cvslog mailing list