[SCM] libav/experimental: smoothstream: check malloc calls

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


The following commit has been merged in the experimental branch:
commit e0d01dc7d7fc3ce4c23f286a10870e9599c8b8b9
Author: Nidhi Makhijani <nidhimj22 at gmail.com>
Date:   Thu May 22 16:20:05 2014 +0530

    smoothstream: check malloc calls
    
    Signed-off-by: Anton Khirnov <anton at khirnov.net>

diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index 2fe01b1..9fe4fe5 100644
--- a/libavformat/smoothstreamingenc.c
+++ b/libavformat/smoothstreamingenc.c
@@ -154,6 +154,8 @@ static void get_private_data(OutputStream *os)
     if (!ptr)
         return;
     os->private_str = av_mallocz(2*size + 1);
+    if (!os->private_str)
+        return;
     for (i = 0; i < size; i++)
         snprintf(&os->private_str[2*i], 3, "%02x", ptr[i]);
     if (ptr != codec->extradata)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list