diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 7c88327e9c..4a042701e3 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -102,6 +102,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;