From 1730ca2eca42974af0c29f38a0770997cba2f0da Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 31 Jan 2013 21:02:06 +0100 Subject: [PATCH] bink demuxer: check malloc return value --- libavformat/bink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/bink.c b/libavformat/bink.c index 5d3de14..62c377d 100644 --- a/libavformat/bink.c +++ b/libavformat/bink.c @@ -116,6 +116,8 @@ static int read_header(AVFormatContext *s) vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = AV_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); -- 2.7.4