diff options
author | Peter Ross <pross@xvid.org> | 2011-01-09 05:21:30 +0300 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2011-01-09 05:21:30 +0300 |
commit | bf2e54174eb24e3271ff22ca6cec2e55a6899350 (patch) | |
tree | 523095662a8c8c8b404b0c376ca809e17b5d61b2 | |
parent | 9372f31e037240cf139e5df55f85bb8f2e64f16e (diff) |
wtv: stop processing chunks if length is smaller than chunk header
Originally committed as revision 26275 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/wtv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/wtv.c b/libavformat/wtv.c index a178eb2d89..0e7db9850e 100644 --- a/libavformat/wtv.c +++ b/libavformat/wtv.c @@ -363,6 +363,8 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p return AVERROR_EOF; len = get_le32(pb); + if (len < 32) + break; sid = get_le32(pb) & 0x7FFF; url_fskip(pb, 8); consumed = 32; |