mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
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>
This commit is contained in:
parent
6201a60631
commit
479361eb92
@ -301,8 +301,8 @@ static int wavesynth_parse_extradata(AVCodecContext *avc)
|
|||||||
default:
|
default:
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
in->amp0 = (int64_t)a1 << 32;
|
in->amp0 = (uint64_t)a1 << 32;
|
||||||
in->damp = (((int64_t)a2 << 32) - ((int64_t)a1 << 32)) / dt;
|
in->damp = (int64_t)(((uint64_t)a2 << 32) - ((uint64_t)a1 << 32)) / dt;
|
||||||
}
|
}
|
||||||
if (edata != edata_end)
|
if (edata != edata_end)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user