From e0d01dc7d7fc3ce4c23f286a10870e9599c8b8b9 Mon Sep 17 00:00:00 2001 From: Nidhi Makhijani Date: Thu, 22 May 2014 16:20:05 +0530 Subject: smoothstream: check malloc calls Signed-off-by: Anton Khirnov --- libavformat/smoothstreamingenc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat/smoothstreamingenc.c') 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) -- cgit v1.2.3