mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avcodec/vorbisdec: Check parameters in vorbis_floor0_decode() before divide
Fixes: division by zero Fixes: 16183/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-5688966782648320 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 aecc9b96d613f54d772e9475738bb54e0e1f182e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c3b4278b01
commit
7dfa2bc0f6
@ -1182,6 +1182,9 @@ static int vorbis_floor0_decode(vorbis_context *vc,
|
|||||||
q *= q;
|
q *= q;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p + q == 0.0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
/* calculate linear floor value */
|
/* calculate linear floor value */
|
||||||
q = exp((((amplitude*vf->amplitude_offset) /
|
q = exp((((amplitude*vf->amplitude_offset) /
|
||||||
(((1ULL << vf->amplitude_bits) - 1) * sqrt(p + q)))
|
(((1ULL << vf->amplitude_bits) - 1) * sqrt(p + q)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user