mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 09:12:33 +00:00
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>
This commit is contained in:
parent
5a06d3810e
commit
8e294abd9d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user