aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-03-13 02:51:15 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-17 20:35:19 +0200
commit9ff9e3931b81971d930c8bd8894714e17a9b03d2 (patch)
tree9778321cfcf9ad3ff603a16c5cd1a1895d82992b
parent8df6363188bff1aa97fd17fcc7af5cb2cd548c1b (diff)
downloadffmpeg-9ff9e3931b81971d930c8bd8894714e17a9b03d2.tar.gz
avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for 32-bit type 'int'
Fixes: 822/clusterfuzz-testcase-4873433189974016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7cebc5a9ccba0de7bddf7900ae85652ebc66141c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/wavpack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 046abe272c..f828fc725b 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -837,7 +837,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
continue;
}
bytestream2_get_buffer(&gb, val, 4);
- if (val[0] > 32) {
+ if (val[0] > 31) {
av_log(avctx, AV_LOG_ERROR,
"Invalid INT32INFO, extra_bits = %d (> 32)\n", val[0]);
continue;