diff options
author | Martin Storsjö <martin@martin.st> | 2013-09-28 23:32:57 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-09-30 10:48:58 +0300 |
commit | cc41167aede4c101ad17eeffa8f39bb6c23d3dad (patch) | |
tree | ea2d45b72800454624f5e6a4e4e35045cbd36551 | |
parent | 487b54104a01fa40a185a9a51e1cf41b2cf72367 (diff) | |
download | ffmpeg-cc41167aede4c101ad17eeffa8f39bb6c23d3dad.tar.gz |
asfdec: Check the return value of asf_read_stream_properties
This makes sure errors in setting stream parameters are passed
on to the caller. This avoids successfully opening files while
some parameters aren't filled in properly.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/asfdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index b99cb02c38..5b4366e7e9 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -743,7 +743,9 @@ static int asf_read_header(AVFormatContext *s) if (ret < 0) return ret; } else if (!ff_guidcmp(&g, &ff_asf_stream_header)) { - asf_read_stream_properties(s, gsize); + int ret = asf_read_stream_properties(s, gsize); + if (ret < 0) + return ret; } else if (!ff_guidcmp(&g, &ff_asf_comment_header)) { asf_read_content_desc(s, gsize); } else if (!ff_guidcmp(&g, &ff_asf_language_guid)) { |