Commit d0c27e88 authored by Michael Niedermayer's avatar Michael Niedermayer

riff: retry reading metadata without padding if it fails with

Fixes Ticket1821
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1350dffd
......@@ -771,8 +771,13 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
chunk_code = avio_rl32(pb);
chunk_size = avio_rl32(pb);
if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
av_log(s, AV_LOG_ERROR, "too big INFO subchunk\n");
return AVERROR_INVALIDDATA;
avio_seek(pb, -9, SEEK_CUR);
chunk_code = avio_rl32(pb);
chunk_size = avio_rl32(pb);
if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
av_log(s, AV_LOG_ERROR, "too big INFO subchunk\n");
return AVERROR_INVALIDDATA;
}
}
chunk_size += (chunk_size & 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment