diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-25 21:50:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-23 21:29:01 +0200 |
commit | 97de004ad9952e068a5b614b302b200fbdd171e2 (patch) | |
tree | 451f32a3be12db18d7cc3112e092b199be7c0ed6 | |
parent | ceb35853cb1fa7bff31c55150c90b49ea4005706 (diff) | |
download | ffmpeg-97de004ad9952e068a5b614b302b200fbdd171e2.tar.gz |
avcodec/ffwavesynth: Fix undefined overflow in wavesynth_synth_sample()
Fixes: signed integer overflow: 2147464192 + 21176 cannot be represented in type 'int'
Fixes: 19042/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5719828090585088
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 fa47f6412dbf93b4865adf8c66618906a3274330)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/ffwavesynth.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ffwavesynth.c b/libavcodec/ffwavesynth.c index 349b45534d..b9c63abb8d 100644 --- a/libavcodec/ffwavesynth.c +++ b/libavcodec/ffwavesynth.c @@ -350,7 +350,8 @@ fail: static void wavesynth_synth_sample(struct wavesynth_context *ws, int64_t ts, int32_t *channels) { - int32_t amp, val, *cv; + int32_t amp, *cv; + unsigned val; struct ws_interval *in; int i, *last, pink; uint32_t c, all_ch = 0; |