Module: libav
Branch: release/9
Commit: fa6eef4210c2fd7f7324d558b09311c75987a31e

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]
(cherry picked from commit f5e646a00ac21e500dae4bcceded790a0fbc5246)

Signed-off-by: Luca Barbato <[email protected]>

---

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

diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index 2e5d39c..1811e46 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -502,6 +502,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