php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24990 Apache segfaults when combination of functions are applied to empty variable
Submitted: 2003-08-08 17:07 UTC Modified: 2003-08-08 17:21 UTC
From: jacob at keystreams dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.3.1 OS: Mandrake Linux; 2.4.8-26mdk
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jacob at keystreams dot com
New email:
PHP Version: OS:

 

 [2003-08-08 17:07 UTC] jacob at keystreams dot com
Description:
------------
When attempting to decode a string using three functions at once (utf8_decode, html_entity_decode, stripslashes) and if the string is null, Apache reports a segfault error and a general 'The page cannot be displayed' error page is shown or the last working client-side cached version of the page. 

Running Apache 1.3.27 w/ mod_rewrite.

PHP ./configure: ./configure --with-mysql=/usr --with-xml --enable-track-vars --with-apache=../apache_1.3.27 --with-curl=/usr/lib --with-dom --with-zlib

Reproduce code:
---------------
<?php
$string = null;
$string = utf8_decode(html_entity_decode(stripslashes($string)));
echo $string;
?>

Expected result:
----------------
It is expected that a decoded string will be returned and echo'd to the browser.

Actual result:
--------------
[no backtrace available] Web browser displays nothing or last cached page results. Apache error_log shows the following:

[Fri Aug  8 15:57:16 2003] [notice] child pid 420 exit signal Segmentation fault (11)

This error is reproduced successfully everytime.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-08 17:21 UTC] sniper@php.net
Cannot reproduce using latest CVS (PHP 4.3.3RC3)

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 07:01:33 2025 UTC