From: Pierre Joye Date: Thu, 28 Jul 2011 10:34:16 +0000 (+0000) Subject: - Fix #55301 (com_dotnet part) check if malloc succeded X-Git-Tag: php-5.4.0alpha3~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=582c2fa8685efdf6315f7ab6467d7e99de1f3156;p=php - Fix #55301 (com_dotnet part) check if malloc succeded --- diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c index 06291ab57d..7c206f6295 100644 --- a/ext/com_dotnet/com_dotnet.c +++ b/ext/com_dotnet/com_dotnet.c @@ -129,6 +129,9 @@ static HRESULT dotnet_init(char **p_where TSRMLS_DC) char *where = ""; stuff = malloc(sizeof(*stuff)); + if (!stuff) { + return S_FALSE; + } memset(stuff, 0, sizeof(*stuff)); where = "CoCreateInstance";