mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/sierravmd: check for memory allocation failures
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
00e1bf8a58
commit
60caa3d8bc
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue