From: Nidhi Makhijani Date: Sun, 6 Jul 2014 15:22:52 +0000 (+0530) Subject: vc1test: Check malloc call X-Git-Tag: v11_alpha1~252 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02a7a5e330ec4373a761f63c292220a1de13b968;p=platform%2Fupstream%2Flibav.git vc1test: Check malloc call Signed-off-by: Diego Biurrun --- diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c index 8fabf7de9..f302c2b12 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);