diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-31 22:53:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-06 03:44:35 +0200 |
commit | 30abd8e6f98243ba0e6744128ece372cc0d7c0fb (patch) | |
tree | 6d4f98fceb40ca1fda8a10967e47e3416d3b41eb /libavcodec/wavpack.c | |
parent | 706b427ff5de7d7ba152ec07c17f657e58180767 (diff) | |
download | ffmpeg-30abd8e6f98243ba0e6744128ece372cc0d7c0fb.tar.gz |
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@niedermayer.cc>
(cherry picked from commit a47273c803edfbc43793349b74429ae29b05c003)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r-- | libavcodec/wavpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |