avformat/mov: take into account the first eight bytes in the keys atom

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-04-01 23:52:53 -03:00
parent 8a23a145d8
commit 3d12ba77d9
1 changed files with 1 additions and 0 deletions

View File

@ -5024,6 +5024,7 @@ static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_skip(pb, 4);
count = avio_rb32(pb);
atom.size -= 8;
if (count > UINT_MAX / sizeof(*c->meta_keys) - 1) {
av_log(c->fc, AV_LOG_ERROR,
"The 'keys' atom with the invalid key count: %"PRIu32"\n", count);