summaryrefslogtreecommitdiff
path: root/libavformat/smoothstreamingenc.c
diff options
context:
space:
mode:
authorNidhi Makhijani <nidhimj22@gmail.com>2014-05-22 16:20:05 +0530
committerAnton Khirnov <anton@khirnov.net>2014-05-24 08:21:49 +0200
commite0d01dc7d7fc3ce4c23f286a10870e9599c8b8b9 (patch)
treecc096f88903cb8ef13c4398681367c3ccbc4c2f9 /libavformat/smoothstreamingenc.c
parent8692e6284f5169257a537c8fc25addf32fc67c87 (diff)
smoothstream: check malloc calls
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/smoothstreamingenc.c')
-rw-r--r--libavformat/smoothstreamingenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index 2fe01b1f59..9fe4fe5ae2 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)