diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index b41ee6a1a6..38ae5eb24e 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -352,6 +352,8 @@ got_sound: av_log(s, AV_LOG_ERROR, "could not find COMM tag or invalid block_align value\n"); return -1; } + if (aiff->block_duration < 0) + return AVERROR_INVALIDDATA; /* Now positioned, get the sound data start and end */ avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);