diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-06-24 18:12:24 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-08-24 11:06:33 +0200 |
commit | fa6eef4210c2fd7f7324d558b09311c75987a31e (patch) | |
tree | d61b63e8f4d507f346b7335834e77adaab8b26ed | |
parent | 3f5824aa18aa7b18016701123efc7e1714d56001 (diff) | |
download | ffmpeg-fa6eef4210c2fd7f7324d558b09311c75987a31e.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
(cherry picked from commit f5e646a00ac21e500dae4bcceded790a0fbc5246)
Signed-off-by: Luca Barbato <lu_zero@gentoo.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 2e5d39cff2..1811e4645c 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; |