Browse Source

avformat/mov: Fix DoS in read_tfra()

Fixes: Missing EOF check in loop
No testcase

Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9cb4eb7728)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.0.10
Michael Niedermayer 8 years ago
parent
commit
d08abbd0bd
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libavformat/mov.c

+ 7
- 0
libavformat/mov.c View File

@@ -4702,6 +4702,13 @@ static int read_tfra(MOVContext *mov, AVIOContext *f)
}
for (i = 0; i < index->item_count; i++) {
int64_t time, offset;

if (avio_feof(f)) {
index->item_count = 0;
av_freep(&index->items);
return AVERROR_INVALIDDATA;
}

if (version == 1) {
time = avio_rb64(f);
offset = avio_rb64(f);


Loading…
Cancel
Save