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 <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-05-24 19:53:57 +02:00
parent 89325417e7
commit bce362d36c

View File

@ -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;