mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
This commit is contained in:
parent
a4baf96abd
commit
f5e646a00a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user