Re: Bug #3226 Updated: This code makes PHP segfault A
| From: | Noll Janos | Date: | Wed, 19 Jan 2000 23:37:46 +0000 |
| Subject: | Re: Bug #3226 Updated: This code makes PHP segfault A | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-14766@lists.php.net to get a copy of this message | ||
Hy!
>>Description: This code makes PHP segfault Apache
>>I've also heard that this affects PHP4 b2 and b3.
> You forgot to post the code :)
Not really:
>>Full Bug description available at:
>>http://bugs.php.net/?id=3226
But here goes:
Okay. So it seems as there's a bug in the functions
base64_decode(); when calling it many times.
Check the code below, and reload it 10-20 times!
It should make a few seg.fault messages in the apache error.log
-----------------------------------------
<?php
echo "<html><body>Start<br>";
flush();
for ($c=0;$c<4000;$c++) {
$a = "a+ly6XM";
$b = base64_decode($a);
}
echo "End<br>";
?>
-----------------------------------------
I was told this crashes PHP4 too, but din't test that, only in PHP3, however
the base64_decode function source code seems to be mostly the same.
| Noll Janos <johnzero@telnet.hu> | http://www.adam.hu/~johnzero |
| "Expect the unexpected!" | finger johnzero@www.adam.hu for PGP |
| ICQ# 4547866 | Linux rulez! |