Browse Source

Merge commit '8e329dba378cef0ff6400c7df9c51da167d5a1f0'

* commit '8e329dba378cef0ff6400c7df9c51da167d5a1f0':
  riff: check for eof if chunk size and code are 0

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.0
Michael Niedermayer 13 years ago
parent
commit
369e5dcfc5
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      libavformat/riff.c

+ 5
- 1
libavformat/riff.c View File

@@ -880,7 +880,7 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
av_log(s, AV_LOG_WARNING, "INFO subchunk truncated\n");
return AVERROR_INVALIDDATA;
}
break;
return AVERROR_EOF;
}
if (chunk_size > end ||
end - chunk_size < cur ||
@@ -899,6 +899,10 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
if (!chunk_code) {
if (chunk_size)
avio_skip(pb, chunk_size);
else if (pb->eof_reached) {
av_log(s, AV_LOG_WARNING, "truncated file\n");
return AVERROR_EOF;
}
continue;
}



Loading…
Cancel
Save