avcodec/wavpack: Fix runtime error: signed integer overflow: -1386217472 * 4 cannot...
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 28 May 2017 10:56:25 +0000 (12:56 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 28 May 2017 10:57:14 +0000 (12:57 +0200)
Fixes: 1853/clusterfuzz-testcase-minimized-5471155626442752

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/wavpack.c

index 3b3c6b2..8c62150 100644 (file)
@@ -310,7 +310,7 @@ static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S)
     }
 
     if (S) {
-        S  *= 1 << s->float_shift;
+        S  *= 1U << s->float_shift;
         sign = S < 0;
         if (sign)
             S = -S;