diff options
author | James Almer <jamrial@gmail.com> | 2024-04-02 00:09:32 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-04-02 09:09:35 -0300 |
commit | 8e294abd9d21ed034371ace87649300405dd5a4b (patch) | |
tree | 6e8c27a767f62112ba690bd68bb4e3ae69c3cbb3 /libavformat/mov.c | |
parent | 5a06d3810e41134ee9c2941cc0b371da62b539db (diff) | |
download | ffmpeg-8e294abd9d21ed034371ace87649300405dd5a4b.tar.gz |
avformat/mov: simplify the entry count overflow check in the keys atom
Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index a935ef7326..b96a02b0d9 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5025,7 +5025,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) { + if (count >= UINT_MAX / sizeof(*c->meta_keys)) { av_log(c->fc, AV_LOG_ERROR, "The 'keys' atom with the invalid key count: %"PRIu32"\n", count); return AVERROR_INVALIDDATA; |