]> granicus.if.org Git - php/commitdiff
-allow pbuf = NULL in case of NO MEMORY, too
authorMarcus Boerger <helly@php.net>
Sun, 23 Jun 2002 22:06:52 +0000 (22:06 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 23 Jun 2002 22:06:52 +0000 (22:06 +0000)
main/spprintf.c

index fcef72b5644dc04a70d0ee994238545dfd3ad2da..1177588e47d09380af846102bad9b3450f96465f 100644 (file)
@@ -618,7 +618,8 @@ PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap
         * highest possible address.
         */
        if (xbuf_init(&xbuf, max_len)) {
-               *pbuf = NULL;
+               if (pbuf)
+                       *pbuf = NULL;
                return 0;
        } else {
                /*