[SCM] libav/experimental: vc1test: Check malloc call

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:03:43 UTC 2014


The following commit has been merged in the experimental branch:
commit 02a7a5e330ec4373a761f63c292220a1de13b968
Author: Nidhi Makhijani <nidhimj22 at gmail.com>
Date:   Sun Jul 6 20:52:52 2014 +0530

    vc1test: Check malloc call
    
    Signed-off-by: Diego Biurrun <diego at biurrun.de>

diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c
index 8fabf7d..f302c2b 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);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list