Hi!
> + //Test 'pbuf'(also known as 'error') against NULL, since it is called
> multiple places without checking against, causing null pointer dereferences.
No C++ comments please.
> if (buf.c) {
> - *pbuf = buf.c;
> + if(pbuf) {
> + *pbuf = buf.c;
> + }
> result = buf.len;
I think if pbuf is null, it should return 0 immediately. The code you
provided would result in a memory leak if pbuf is NULL, since the
pointer to buf.c would be lost as soon as vspprintf exits.
--
Stas Malyshev
[email protected]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php