diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index 3eb36f56f5..a222a46c86 100644 --- a/libavformat/iamf_parse.c +++ b/libavformat/iamf_parse.c @@ -252,7 +252,7 @@ static int codec_config_obu(void *s, IAMFContext *c, AVIOContext *pb, int len) if (ret < 0) 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)) { ret = AVERROR_INVALIDDATA; goto fail;