mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/ffwavesynth: Fix integer overflow in wavesynth_synth_sample / WS_SINE
Fixes: signed integer overflow: -1429092 * -32596 cannot be represented in type 'int'
Fixes: 24419/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5157849974702080
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a0da95df77
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
de79966a44
commit
df67250903
@ -373,7 +373,7 @@ static void wavesynth_synth_sample(struct wavesynth_context *ws, int64_t ts,
|
||||
in->amp += in->damp;
|
||||
switch (in->type) {
|
||||
case WS_SINE:
|
||||
val = amp * ws->sin[in->phi >> (64 - SIN_BITS)];
|
||||
val = amp * (unsigned)ws->sin[in->phi >> (64 - SIN_BITS)];
|
||||
in->phi += in->dphi;
|
||||
in->dphi += in->ddphi;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user