Commit f5e646a0 authored by Luca Barbato's avatar Luca Barbato
Browse files

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
parent a4baf96a
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment