From: Marcus Boerger Date: Sun, 23 Jun 2002 22:06:52 +0000 (+0000) Subject: -allow pbuf = NULL in case of NO MEMORY, too X-Git-Tag: php-4.3.0dev_zend2_alpha2~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3222bb5b77aa3ad1704598966b60072501915c8;p=php -allow pbuf = NULL in case of NO MEMORY, too --- diff --git a/main/spprintf.c b/main/spprintf.c index fcef72b564..1177588e47 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -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 { /*