[FFmpeg-cvslog] avcodec/golomb: Assert that k is valid in get_ur_golomb_jpegls()
Michael Niedermayer
git at videolan.org
Sat May 6 22:12:50 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat May 6 18:25:02 2017 +0200| [0884b1c5ffe07584984dadad29346c95c78fac19] | committer: Michael Niedermayer
avcodec/golomb: Assert that k is valid in get_ur_golomb_jpegls()
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0884b1c5ffe07584984dadad29346c95c78fac19
---
libavcodec/golomb.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index 47b369f88c..6911759c6b 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -314,6 +314,8 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit,
log = av_log2(buf);
+ av_assert2(k <= 31);
+
if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
32 - log < limit) {
buf >>= log - k;
More information about the ffmpeg-cvslog
mailing list