pajoye                                   Thu, 28 Jul 2011 10:34:16 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=313827

Log:
- Fix #55301 (com_dotnet part) check if malloc succeded

Bug: https://bugs.php.net/55301 (error getting bug information)
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/com_dotnet/com_dotnet.c
    U   php/php-src/branches/PHP_5_4/ext/com_dotnet/com_dotnet.c
    U   php/php-src/trunk/ext/com_dotnet/com_dotnet.c

Modified: php/php-src/branches/PHP_5_3/ext/com_dotnet/com_dotnet.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/com_dotnet/com_dotnet.c    2011-07-28 
10:31:34 UTC (rev 313826)
+++ php/php-src/branches/PHP_5_3/ext/com_dotnet/com_dotnet.c    2011-07-28 
10:34:16 UTC (rev 313827)
@@ -129,6 +129,9 @@
        char *where = "";

        stuff = malloc(sizeof(*stuff));
+       if (!stuff) {
+               return S_FALSE;
+       }
        memset(stuff, 0, sizeof(*stuff));

        where = "CoCreateInstance";

Modified: php/php-src/branches/PHP_5_4/ext/com_dotnet/com_dotnet.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/com_dotnet/com_dotnet.c    2011-07-28 
10:31:34 UTC (rev 313826)
+++ php/php-src/branches/PHP_5_4/ext/com_dotnet/com_dotnet.c    2011-07-28 
10:34:16 UTC (rev 313827)
@@ -129,6 +129,9 @@
        char *where = "";

        stuff = malloc(sizeof(*stuff));
+       if (!stuff) {
+               return S_FALSE;
+       }
        memset(stuff, 0, sizeof(*stuff));

        where = "CoCreateInstance";

Modified: php/php-src/trunk/ext/com_dotnet/com_dotnet.c
===================================================================
--- php/php-src/trunk/ext/com_dotnet/com_dotnet.c       2011-07-28 10:31:34 UTC 
(rev 313826)
+++ php/php-src/trunk/ext/com_dotnet/com_dotnet.c       2011-07-28 10:34:16 UTC 
(rev 313827)
@@ -129,6 +129,9 @@
        char *where = "";

        stuff = malloc(sizeof(*stuff));
+       if (!stuff) {
+               return S_FALSE;
+       }
        memset(stuff, 0, sizeof(*stuff));

        where = "CoCreateInstance";

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to