提交 aecc9b96 编写于 作者: M Michael Niedermayer

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/ffmpegSigned-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 652ea23c
......@@ -1182,6 +1182,9 @@ static int vorbis_floor0_decode(vorbis_context *vc,
q *= q;
}
if (p + q == 0.0)
return AVERROR_INVALIDDATA;
/* calculate linear floor value */
q = exp((((amplitude*vf->amplitude_offset) /
(((1ULL << vf->amplitude_bits) - 1) * sqrt(p + q)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册