[FFmpeg-cvslog] wtv: Mark attachment with a negative stream id

Luca Barbato git at videolan.org
Sat Sep 14 10:56:37 CEST 2013


ffmpeg | branch: release/0.10 | Luca Barbato <lu_zero at gentoo.org> | Mon Jun 24 18:12:24 2013 +0200| [139f352daf84e005824562e0e0f36e06ac60ee36] | committer: Luca Barbato

wtv: Mark attachment with a negative stream id

A sid 0 would be mismatched to the attachment.

Prevent NULL pointer dereference.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry picked from commit f5e646a00ac21e500dae4bcceded790a0fbc5246)

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

 libavformat/wtv.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index c619868..2d5d7c5 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -489,6 +489,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
     st->codec->codec_id   = CODEC_ID_MJPEG;
     st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
     st->codec->extradata  = av_mallocz(filesize);
+    st->id = -1;
     if (!st->codec->extradata)
         goto done;
     st->codec->extradata_size = filesize;



More information about the ffmpeg-cvslog mailing list