avcodec/golomb: Assert that k is valid in get_ur_golomb_jpegls()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9bf4523e40
commit
0884b1c5ff
@ -314,6 +314,8 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit,
|
|||||||
|
|
||||||
log = av_log2(buf);
|
log = av_log2(buf);
|
||||||
|
|
||||||
|
av_assert2(k <= 31);
|
||||||
|
|
||||||
if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
|
if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
|
||||||
32 - log < limit) {
|
32 - log < limit) {
|
||||||
buf >>= log - k;
|
buf >>= log - k;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user