Commit 60caa3d8 authored by Paul B Mahol's avatar Paul B Mahol

avformat/sierravmd: check for memory allocation failures

Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
parent 00e1bf8a
......@@ -126,8 +126,10 @@ static int vmd_read_header(AVFormatContext *s)
vst->codec->width >>= 1;
vst->codec->height >>= 1;
}
vst->codec->extradata_size = VMD_HEADER_SIZE;
vst->codec->extradata = av_mallocz(VMD_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
if (!vst->codec->extradata)
return AVERROR(ENOMEM);
vst->codec->extradata_size = VMD_HEADER_SIZE;
memcpy(vst->codec->extradata, vmd->vmd_header, VMD_HEADER_SIZE);
}
......
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