mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 07:31:22 +01:00
avformat/mov: Fix potential integer overflow in entry check in mov_read_trun()
No testcase Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d92034a06a
commit
ff13a92a6f
1 changed files with 1 additions and 1 deletions
|
|
@ -4778,7 +4778,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||
av_log(c->fc, AV_LOG_TRACE, "first sample flags 0x%x\n", first_sample_flags);
|
||||
|
||||
// realloc space for new index entries
|
||||
if((unsigned)st->nb_index_entries + entries >= UINT_MAX / sizeof(AVIndexEntry)) {
|
||||
if((uint64_t)st->nb_index_entries + entries >= UINT_MAX / sizeof(AVIndexEntry)) {
|
||||
entries = UINT_MAX / sizeof(AVIndexEntry) - st->nb_index_entries;
|
||||
av_log(c->fc, AV_LOG_ERROR, "Failed to add index entry\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue