git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bf4523
)
avcodec/golomb: Assert that k is valid in get_ur_golomb_jpegls()
author
Michael Niedermayer
<michael@niedermayer.cc>
Sat, 6 May 2017 16:25:02 +0000
(18:25 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Sat, 6 May 2017 16:25:02 +0000
(18:25 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/golomb.h
patch
|
blob
|
history
diff --git
a/libavcodec/golomb.h
b/libavcodec/golomb.h
index
47b369f
..
6911759
100644
(file)
--- 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;