#15106 [Ctl->Csd]: import_request_variables segfault...
| From: | zeev@php.net | Date: | Sat, 24 Aug 2002 00:43:44 +0000 |
| Subject: | #15106 [Ctl->Csd]: import_request_variables segfault... | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17706@lists.php.net to get a copy of this message | ||
ID: 15106
Updated by: zeev@php.net
Reported By: robert@artnickel.com
-Status: Critical
+Status: Closed
Bug Type: Reproducible crash
Operating System: Linux 2.4.10
PHP Version: 4.3.0-dev
New Comment:
Fixed for 4.2.3
Previous Comments:
------------------------------------------------------------------------
[2002-06-17 19:42:05] sniper@php.net
Reproduced with latest CVS HEAD. Making this 'fix before 4.3.0 is
released' critical.
------------------------------------------------------------------------
[2002-01-18 14:32:01] robert@artnickel.com
Usage of the import_request_variables function more than once with the
same value for the method type and prefix string will produce a
segfault.
The example:
<html>
<body>
<?
@import_request_variables("g", "");
foreach($_GET as $b=>$c)
print "Key: $b | Value: $c<br>\n";
flush();
@import_request_variables("g", "");
foreach($_GET as $b=>$c)
print "Key: $b | Value: $c<br>\n";
?>
</body>
</html>
The second foreach loop will never be reached and the flush() call will
be ineffectual since the module segfaults and doesn't care about the
buffer. The segfault only affects the php module and will NOT bring
down the apache server. Although not shown here for space
conservation, if by chance this is done via an include, the results are
mixed. I have some that will cause a segfault ans some that don't and
I haven't figured out the difference between them.
Specifics:
Apache 1.3.22
Linux 2.4.10 kernel
PHP running as a DSO with apache using the php.ini-recommended with
very few modifications (available on request if necessary)
Thanks,
--Robert
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15106&edit=1