aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-04-01 23:52:53 -0300
committerJames Almer <jamrial@gmail.com>2024-04-02 00:13:12 -0300
commit3d12ba77d9a4660b2e71889d1c2f99e8f3ade98b (patch)
tree2fe779c657130c6c8cc971ea1682fbc518f2c1d3
parent8a23a145d85964950123952d897b89c2c2b1b8c5 (diff)
downloadffmpeg-3d12ba77d9a4660b2e71889d1c2f99e8f3ade98b.tar.gz
avformat/mov: take into account the first eight bytes in the keys atom
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavformat/mov.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2b7ddc516c..3273e2e89b 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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);