diff options
author | Nidhi Makhijani <nidhimj22@gmail.com> | 2014-07-06 20:52:52 +0530 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-07-06 09:25:52 -0700 |
commit | 02a7a5e330ec4373a761f63c292220a1de13b968 (patch) | |
tree | c996efea55233e03ce04906705d247e83e2b7b5b /libavformat/vc1test.c | |
parent | 77fc7b76726719746ca45df6c4a62c41abad506e (diff) | |
download | ffmpeg-02a7a5e330ec4373a761f63c292220a1de13b968.tar.gz |
vc1test: Check malloc call
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavformat/vc1test.c')
-rw-r--r-- | libavformat/vc1test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c index 8fabf7de9b..f302c2b12a 100644 --- a/libavformat/vc1test.c +++ b/libavformat/vc1test.c @@ -62,6 +62,8 @@ static int vc1t_read_header(AVFormatContext *s) st->codec->codec_id = AV_CODEC_ID_WMV3; st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE); + if (!st->codec->extradata) + return AVERROR(ENOMEM); st->codec->extradata_size = VC1_EXTRADATA_SIZE; avio_read(pb, st->codec->extradata, VC1_EXTRADATA_SIZE); st->codec->height = avio_rl32(pb); |