From bce362d36ccfe8f778662bcfd956187c958a39b5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 24 May 2017 19:53:57 +0200 Subject: [PATCH] avcodec/wavpack: Fix runtime error: left shift of negative value -1 Fixes: 1807/clusterfuzz-testcase-minimized-6258676199325696 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/wavpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 74ca2d492c..103a416f28 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -310,7 +310,7 @@ static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S) } if (S) { - S <<= s->float_shift; + S *= 1 << s->float_shift; sign = S < 0; if (sign) S = -S;