summaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-03-06 21:52:36 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-03-08 21:15:07 +0100
commit3016e919d4e1d90da98af19ce2a9d4979506eaf3 (patch)
tree0986867ff837ef23b397770c827bfddaa4d4553a /libavcodec/wavpack.c
parent01a33b835f7a9e135eb8c7b7dd98c8b89f15dea1 (diff)
downloadffmpeg-3016e919d4e1d90da98af19ce2a9d4979506eaf3.tar.gz
avcodec/wavpack: Fix runtime error: left shift of negative value -5
Fixes: 729/clusterfuzz-testcase-5154831595470848 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index a4ba07fc83..943e46a25c 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -273,7 +273,7 @@ static inline int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc,
unsigned bit;
if (s->extra_bits) {
- S <<= s->extra_bits;
+ S *= 1 << s->extra_bits;
if (s->got_extra_bits &&
get_bits_left(&s->gb_extra_bits) >= s->extra_bits) {