[FFmpeg-cvslog] avcodec/wavpack: Fix runtime error: signed integer overflow: 2013265955 - -134217694 cannot be represented in type 'int'
Michael Niedermayer
git at videolan.org
Wed Jun 7 01:03:34 EEST 2017
ffmpeg | branch: release/3.3 | Michael Niedermayer <michael at niedermayer.cc> | Wed May 31 22:53:02 2017 +0200| [30abd8e6f98243ba0e6744128ece372cc0d7c0fb] | committer: Michael Niedermayer
avcodec/wavpack: Fix runtime error: signed integer overflow: 2013265955 - -134217694 cannot be represented in type 'int'
Fixes: 1922/clusterfuzz-testcase-minimized-5561194112876544
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 a47273c803edfbc43793349b74429ae29b05c003)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=30abd8e6f98243ba0e6744128ece372cc0d7c0fb
---
libavcodec/wavpack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 427296d06b..83e5c906cf 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -245,7 +245,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
if (get_bits_left(gb) <= 0)
goto error;
if (get_bits1(gb)) {
- add -= (mid - base);
+ add -= (mid - (unsigned)base);
base = mid;
} else
add = mid - base - 1;
More information about the ffmpeg-cvslog
mailing list