diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-02-01 00:02:06 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-02-01 15:41:38 +0400 |
commit | 1730ca2eca42974af0c29f38a0770997cba2f0da (patch) | |
tree | 090d95403c7a9d7f1e05167c3987727706129902 /libavformat | |
parent | f2960097e42ddf9a356bab6547f87906f6999e0a (diff) |
bink demuxer: check malloc return value
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/bink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/bink.c b/libavformat/bink.c index 5d3de14567..62c377dfff 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); |