diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-27 14:47:32 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-19 03:50:35 +0300 |
commit | 610bd595228b41384c1910178a7efe40f3127cbd (patch) | |
tree | 7665bd2f3aa075c2e70f93c2ce64a13a84f28007 | |
parent | a5e969dd28c2f6f5b2c322cb1856338f6e206ca1 (diff) |
avcodec/wavpack: Fix invalid shift
Fixes: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 2377/clusterfuzz-testcase-minimized-6108505935183872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c07af720984acaafaa273369080b458d73975775)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/wavpack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 907e2f725b..2c7afda69f 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -835,9 +835,9 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, continue; } bytestream2_get_buffer(&gb, val, 4); - if (val[0] > 31) { + if (val[0] > 30) { av_log(avctx, AV_LOG_ERROR, - "Invalid INT32INFO, extra_bits = %d (> 32)\n", val[0]); + "Invalid INT32INFO, extra_bits = %d (> 30)\n", val[0]); continue; } else if (val[0]) { s->extra_bits = val[0]; |