mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/mov: check that iloc offset values fit on an int64_t
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
89a85efbf1
commit
b44758d8e4
@ -8010,7 +8010,7 @@ static int mov_read_SAND(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rb_size(AVIOContext *pb, uint64_t* value, int size)
|
||||
static int rb_size(AVIOContext *pb, int64_t *value, int size)
|
||||
{
|
||||
if (size == 0)
|
||||
*value = 0;
|
||||
@ -8020,9 +8020,11 @@ static int rb_size(AVIOContext *pb, uint64_t* value, int size)
|
||||
*value = avio_rb16(pb);
|
||||
else if (size == 4)
|
||||
*value = avio_rb32(pb);
|
||||
else if (size == 8)
|
||||
else if (size == 8) {
|
||||
*value = avio_rb64(pb);
|
||||
else
|
||||
if (*value < 0)
|
||||
return -1;
|
||||
} else
|
||||
return -1;
|
||||
return size;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user