diff --git a/libavformat/mm.c b/libavformat/mm.c index 23c025d852..e377ed4fbb 100644 --- a/libavformat/mm.c +++ b/libavformat/mm.c @@ -95,7 +95,7 @@ static int read_header(AVFormatContext *s) type = avio_rl16(pb); length = avio_rl32(pb); - if (type != MM_TYPE_HEADER) + if (type != MM_TYPE_HEADER || length < 10) return AVERROR_INVALIDDATA; /* read header */