History

avformat/mov: simplify the entry count overflow check in the keys atom

James Almer committed 2 years ago

Commit 8e294ab1 parent 5a06d381 file · +1 −1Browse files

Unified · Split

libavformat/mov.c+1−1
@@ -5025,7 +5025,7 @@ static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 5024 unmodified lines
5025 avio_skip(pb, 4);5025 avio_skip(pb, 4);
5026 count = avio_rb32(pb);5026 count = avio_rb32(pb);
5027 atom.size -= 8;5027 atom.size -= 8;
5028 if (count > UINT_MAX / sizeof(*c->meta_keys) - 1) {5028 if (count >= UINT_MAX / sizeof(*c->meta_keys)) {
5029 av_log(c->fc, AV_LOG_ERROR,5029 av_log(c->fc, AV_LOG_ERROR,
5030 "The 'keys' atom with the invalid key count: %"PRIu32"\n", count);5030 "The 'keys' atom with the invalid key count: %"PRIu32"\n", count);
5031 return AVERROR_INVALIDDATA;5031 return AVERROR_INVALIDDATA;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t