diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-11 21:42:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-11 23:55:49 +0200 |
commit | 2752410c47889a94778a541c09ed29ccce8a8de9 (patch) | |
tree | fdfb323b8dc6c46eda33106dae935b4c92d48820 | |
parent | 15e892aad12b23e9b5686cf66ca6fa739c734ead (diff) | |
download | ffmpeg-2752410c47889a94778a541c09ed29ccce8a8de9.tar.gz |
avcodec/golomb: Fix runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 1481/clusterfuzz-testcase-minimized-5264379509473280
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/golomb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 6911759c6b..0833aff468 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -352,7 +352,7 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, buf = 0; } - buf += (i << k); + buf += ((SUINT)i << k); } else if (i == limit - 1) { buf = SHOW_UBITS(re, gb, esc_len); LAST_SKIP_BITS(re, gb, esc_len); |