mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-08 22:39:44 +02:00
avformat/mm: Check length
Fixes: CID1220824 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 139bf412464e62a83984cd49093936dcaa7a0865) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0644c26777
commit
37f05d29b6
@ -94,7 +94,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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user