diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index e660531801..833ab30643 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -101,6 +101,9 @@ static int get_aiff_header(AVFormatContext *s, int size, int sample_rate; unsigned int num_frames; + if (size == INT_MAX) + return AVERROR_INVALIDDATA; + if (size & 1) size++; par->codec_type = AVMEDIA_TYPE_AUDIO;