Re: base64_encode() memory issue
| From: | Ron Korving | Date: | Thu, 30 Dec 2004 10:15:41 +0000 |
| Subject: | Re: base64_encode() memory issue | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-14240@lists.php.net to get a copy of this message | ||
My bad, sorry for wasting your time.
Ron
"Stefan Esser" <sesser@php.net> schreef in bericht
news:41D3D235.4000409@php.net...
> Hello,
>
> this issue was already cleared as bogus
>
> safe_emalloc already takes care of the one extra byte that should get
added.
>
> safe_emalloc does allocate param1 * param2 + param3 bytes
>
> > result = (unsigned char *)safe_emalloc(((length + 2) / 3) * 4,
sizeof(char),
> > 1);
> >
> > would become
> >
> > result = (unsigned char *)safe_emalloc(((length + 2) / 3) * 4 + 1,
> > sizeof(char), 1);
>
> Stefan