diff options
author | Martin Storsjö <martin@martin.st> | 2010-07-20 11:52:29 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-07-20 11:52:29 +0000 |
commit | fed795927182335ddf6c8e39268cfcea989ef7ae (patch) | |
tree | 1716b220bb69ab89858dc8a6c24bb3b55d8dd7e7 | |
parent | a3ab7c32496c696113cf0189aa3ab9dc4d41e207 (diff) | |
download | ffmpeg-fed795927182335ddf6c8e39268cfcea989ef7ae.tar.gz |
asfdec: Don't read the video stream header if there isn't enough data
Originally committed as revision 24352 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/asfdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 0da4b94ee7..840c1864a5 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -361,7 +361,8 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) st->codec->frame_size = 1; break; } - } else if (type == AVMEDIA_TYPE_VIDEO) { + } else if (type == AVMEDIA_TYPE_VIDEO && + gsize - (url_ftell(pb) - pos1 + 24) >= 53) { get_le32(pb); get_le32(pb); get_byte(pb); |