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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 16:01:35 2024 UTC