diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 22dc3597ee..83d09527ad 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -366,6 +366,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);