From bf2e54174eb24e3271ff22ca6cec2e55a6899350 Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Sun, 9 Jan 2011 02:21:30 +0000 Subject: [PATCH] wtv: stop processing chunks if length is smaller than chunk header Originally committed as revision 26275 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/wtv.c | 2 ++ 1 file changed, 2 insertions(+) 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;