[FFmpeg-cvslog] bink: check av_mallocz() return value
Paul B Mahol
git at videolan.org
Sat Jun 9 13:05:46 CEST 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jun 9 10:57:14 2012 +0000| [e400b95b3205d5b861346f525cf6f423d93d2f04] | committer: Paul B Mahol
bink: check av_mallocz() return value
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e400b95b3205d5b861346f525cf6f423d93d2f04
---
libavformat/bink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/bink.c b/libavformat/bink.c
index 20cf609..5eb2211 100644
--- a/libavformat/bink.c
+++ b/libavformat/bink.c
@@ -115,6 +115,8 @@ static int read_header(AVFormatContext *s)
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_BINKVIDEO;
vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!vst->codec->extradata)
+ return AVERROR(ENOMEM);
vst->codec->extradata_size = 4;
avio_read(pb, vst->codec->extradata, 4);
More information about the ffmpeg-cvslog
mailing list