Module: libav
Branch: master
Commit: f5e646a00ac21e500dae4bcceded790a0fbc5246

Author:    Luca Barbato <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Mon Jun 24 18:12:24 2013 +0200

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: [email protected]

---

 libavformat/wtv.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index 23b662d..8b92746 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -472,6 +472,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext 
*pb, int length)
     st->codec->codec_id   = AV_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;

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to