[FFmpeg-cvslog] avcodec/wavpack: Fix invalid shift
Michael Niedermayer
git at videolan.org
Tue Aug 1 15:43:20 EEST 2017
ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 27 13:47:32 2017 +0200| [be1f146a0f1c1d30d6ec09b93c29615dae7caff6] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit c07af720984acaafaa273369080b458d73975775)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be1f146a0f1c1d30d6ec09b93c29615dae7caff6
---
libavcodec/wavpack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 70625548eb..0429adcfe1 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -837,9 +837,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];
More information about the ffmpeg-cvslog
mailing list