[FFmpeg-cvslog] wtvdec: fix null pointer dereference

Michael Niedermayer git at videolan.org
Mon Dec 3 01:42:06 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec  2 22:36:15 2012 +0100| [ec79b1fc88b2cc6a9ab6cd953efcdbaebedde233] | committer: Michael Niedermayer

wtvdec: fix null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec79b1fc88b2cc6a9ab6cd953efcdbaebedde233
---

 libavformat/wtvdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index c3f5750..0706145 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -763,7 +763,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
             }
         } else if (!ff_guidcmp(g, ff_stream2_guid)) {
             int stream_index = ff_find_stream_index(s, sid);
-            if (stream_index >= 0 && !((WtvStream*)s->streams[stream_index]->priv_data)->seen_data) {
+            if (stream_index >= 0 && s->streams[stream_index]->priv_data && !((WtvStream*)s->streams[stream_index]->priv_data)->seen_data) {
                 ff_asf_guid mediatype, subtype, formattype;
                 int size;
                 avio_skip(pb, 12);



More information about the ffmpeg-cvslog mailing list