diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-10 23:09:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-04 20:26:35 +0200 |
commit | bcc1fe5165b21d6039c5be87e8ee8c25de1339d6 (patch) | |
tree | 5be9a4c1de5917852d160b80ad8eef8846217263 /libavcodec/ffwavesynth.c | |
parent | 634f590061b5044cc1621dbd8e6ca80693ebd573 (diff) | |
download | ffmpeg-bcc1fe5165b21d6039c5be87e8ee8c25de1339d6.tar.gz |
avcodec/ffwavesynth: Fix integer overflow for some corner case values
Fixes: left shift of negative value -14671840
Fixes: 16000/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5145977817661440
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 c4a88fb546b64179aff12c169239285932e570ac)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffwavesynth.c')
-rw-r--r-- | libavcodec/ffwavesynth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ffwavesynth.c b/libavcodec/ffwavesynth.c index b319b3341a..e6d2606c2f 100644 --- a/libavcodec/ffwavesynth.c +++ b/libavcodec/ffwavesynth.c @@ -301,8 +301,8 @@ static int wavesynth_parse_extradata(AVCodecContext *avc) default: return AVERROR(EINVAL); } - in->amp0 = (int64_t)a1 << 32; - in->damp = (((int64_t)a2 << 32) - ((int64_t)a1 << 32)) / dt; + in->amp0 = (uint64_t)a1 << 32; + in->damp = (int64_t)(((uint64_t)a2 << 32) - ((uint64_t)a1 << 32)) / dt; } if (edata != edata_end) return AVERROR(EINVAL); |