diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-31 22:53:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-31 22:53:51 +0200 |
commit | a47273c803edfbc43793349b74429ae29b05c003 (patch) | |
tree | 7ac3d711bcd5994ffe83a7bdacd3a6a125fa7c55 | |
parent | e47057e932ff9a071d52fa1d5d4a956340eb2475 (diff) | |
download | ffmpeg-streaming-a47273c803edfbc43793349b74429ae29b05c003.zip ffmpeg-streaming-a47273c803edfbc43793349b74429ae29b05c003.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>
-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 929d9ef..b216eb0 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; |