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

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 3d12ba77d9)
release/7.0
James Almer 10 months ago
parent 64a048d4cc
commit 0085da21b4
  1. 1
      libavformat/mov.c

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

Loading…
Cancel
Save