aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-07-11 19:29:14 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-21 16:41:32 +0200
commit139bf412464e62a83984cd49093936dcaa7a0865 (patch)
treee9f4304722304da08f46b87daa1104e883f03fbd
parent291356f58b8a1af491c692a89e6c4e70e9496f9d (diff)
downloadffmpeg-139bf412464e62a83984cd49093936dcaa7a0865.tar.gz
avformat/mm: Check length
Fixes: CID1220824 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mm.c2
1 files changed, 1 insertions, 1 deletions
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 */