Re: [PHP-DEV] [PATCH] Fix null pointer dereference(s) --
On 16/01/15 19:23, Stanislav Malyshev wrote: > No C++ comments please. Fixed.(Will push afterwards) >> >if (buf.c) { >> > - *pbuf = buf.c; >> > + if(pbuf) { >> > + *pbuf = buf.c; >> > + } >> >result = buf.len; > I think if pbuf is null, it
Re: [PHP-DEV] [PATCH] Fix null pointer dereference(s) --
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 =