[FFmpeg-cvslog] avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for 32-bit type 'int'

Michael Niedermayer git at videolan.org
Tue Mar 14 03:25:49 EET 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Mar 13 02:51:15 2017 +0100| [7cebc5a9ccba0de7bddf7900ae85652ebc66141c] | committer: Michael Niedermayer

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 at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7cebc5a9ccba0de7bddf7900ae85652ebc66141c
---

 libavcodec/wavpack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 943e46a..bc94b27 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -846,7 +846,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;



More information about the ffmpeg-cvslog mailing list