diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-06-24 18:12:24 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-07-07 04:28:51 +0200 |
commit | f5e646a00ac21e500dae4bcceded790a0fbc5246 (patch) | |
tree | 17cfa9e95bfba333ba3eba919653f2e138647826 | |
parent | a4baf96abd64cda68e3e4692b182bdf60745a14d (diff) | |
download | ffmpeg-f5e646a00ac21e500dae4bcceded790a0fbc5246.tar.gz |
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@libav.org
-rw-r--r-- | libavformat/wtv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/wtv.c b/libavformat/wtv.c index 23b662d871..8b927466cf 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; |