|
|
|
@@ -902,6 +902,7 @@ static int w64_read_header(AVFormatContext *s) |
|
|
|
} else if (!memcmp(guid, ff_w64_guid_summarylist, 16)) { |
|
|
|
int64_t start, end, cur; |
|
|
|
uint32_t count, chunk_size, i; |
|
|
|
int64_t filesize = avio_size(s->pb); |
|
|
|
|
|
|
|
start = avio_tell(pb); |
|
|
|
end = start + FFALIGN(size, INT64_C(8)) - 24; |
|
|
|
@@ -916,7 +917,7 @@ static int w64_read_header(AVFormatContext *s) |
|
|
|
chunk_key[4] = 0; |
|
|
|
avio_read(pb, chunk_key, 4); |
|
|
|
chunk_size = avio_rl32(pb); |
|
|
|
if (chunk_size == UINT32_MAX) |
|
|
|
if (chunk_size == UINT32_MAX || (filesize >= 0 && chunk_size > filesize)) |
|
|
|
return AVERROR_INVALIDDATA; |
|
|
|
|
|
|
|
value = av_mallocz(chunk_size + 1); |
|
|
|
|