mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/iamf_parse: Check for 0 samples
Fixes: division by zero Fixes: 70561/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6199435013455872 Fixes: 70565/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5783790316748800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit ed96ac87a94aa0943412af93ef51c22cdc4c907c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
abd5df3033
commit
f2145744a2
@ -252,7 +252,7 @@ static int codec_config_obu(void *s, IAMFContext *c, AVIOContext *pb, int len)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if ((codec_config->nb_samples > INT_MAX) ||
|
if ((codec_config->nb_samples > INT_MAX) || codec_config->nb_samples <= 0 ||
|
||||||
(-codec_config->audio_roll_distance > INT_MAX / codec_config->nb_samples)) {
|
(-codec_config->audio_roll_distance > INT_MAX / codec_config->nb_samples)) {
|
||||||
ret = AVERROR_INVALIDDATA;
|
ret = AVERROR_INVALIDDATA;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user