Re: PHP 4.0 Bug #2795: Memory Leak in base64_encode()
| From: | Andrei Zmievski | Date: | Tue, 23 Nov 1999 15:32:05 +0000 |
| Subject: | Re: PHP 4.0 Bug #2795: Memory Leak in base64_encode() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-12994@lists.php.net to get a copy of this message | ||
On Tue, 23 Nov 1999, evan715@sirius.com wrote:
> When compiled as a CGI, PHP prints the following:
>
> [root@localhost php4]# ./php -f cy
> cgi_main.c(323) : Freeing 0x080F4010 (3 bytes), script=cy
> ZGZkZmRmZA==[root@localhost php4]#
>
> The script 'cy' contains:
>
> <?
> $i = "dfdfdfd";
> echo base64_encode($i);
> ?>
It's not base64_encode() problem. If you look at line 323 in cgi_main.c:
SG(request_info).path_translated = estrdup(optarg);
Which never gets freed. I'm not sure exactly where it should be freed
and under what conditions. Sascha, Zeev?
-Andrei
* Life may be expensive, but it includes an annual free trip around the sun. *