diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-01 18:48:37 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-01 22:20:16 +0200 |
commit | 8b3e580b7f436206e84dac89415e057fa9abdab8 (patch) | |
tree | 6c77a7ee0d87f06d373a9590262cccff321dcffe /libavcodec | |
parent | cd6f319a7470394044627d1bd900e21b9aca5f4a (diff) | |
download | ffmpeg-8b3e580b7f436206e84dac89415e057fa9abdab8.tar.gz |
avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for 32-bit type 'int'
Fixes: 1967/clusterfuzz-testcase-minimized-5757031199801344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/wavpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index b216eb0683..25c8e94ca2 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -188,7 +188,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb, goto error; t += t2; } else { - if (get_bits_left(gb) < t2 - 1) + if (t2 >= 32 || get_bits_left(gb) < t2 - 1) goto error; t += get_bits_long(gb, t2 - 1) | (1 << (t2 - 1)); } |