[FFmpeg-cvslog] avcodec/wavpack: Fix runtime error: signed integer overflow: 2081021665 - -130689706 cannot be represented in type 'int'

Michael Niedermayer git at videolan.org
Sun Jun 4 18:52:18 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Jun  4 17:14:13 2017 +0200| [e2bbb95d582111b79e3bf26af7a80f05637f2866] | committer: Michael Niedermayer

avcodec/wavpack: Fix runtime error: signed integer overflow: 2081021665 - -130689706 cannot be represented in type 'int'

Fixes: 2038/clusterfuzz-testcase-minimized-4521466148159488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 25c8e94ca2..6e601f02fa 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -248,7 +248,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
                 add -= (mid - (unsigned)base);
                 base = mid;
             } else
-                add = mid - base - 1;
+                add = mid - (unsigned)base - 1;
             mid = (base * 2U + add + 1) >> 1;
         }
         ret = mid;



More information about the ffmpeg-cvslog mailing list