You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavf/mov.c: Avoid heap allocation wrap in mov_read_uuid
Core of patch is from paul@paulmehta.com Reference https://crbug.com/643951 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Check value reduced as the code does not support values beyond INT_MAX Also the check is moved to a more common place and before integer truncation
This commit is contained in:
committed by
Michael Niedermayer
parent
fd30e4d57f
commit
2d453188c2
@@ -4789,7 +4789,7 @@ static int mov_read_uuid(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
0x88, 0x14, 0x58, 0x7a, 0x02, 0x52, 0x1f, 0xdd,
|
||||
};
|
||||
|
||||
if (atom.size < sizeof(uuid) || atom.size == INT64_MAX)
|
||||
if (atom.size < sizeof(uuid) || atom.size >= FFMIN(INT_MAX, SIZE_MAX))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (c->fc->nb_streams < 1)
|
||||
|
Reference in New Issue
Block a user