php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1028 str_replace
Submitted: 1999-01-05 06:02 UTC Modified: 1999-01-08 10:56 UTC
From: tobias at dnet dot it Assigned: sas (profile)
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.6 OS: FreeBSD 2.2.2-release
Private report: No CVE-ID: None
 [1999-01-05 06:02 UTC] tobias at dnet dot it
PHP 3.0.6 as Apache-1.3.3-module, MySQL module, magic_quotes_gpc compiled in. This is the first time I'm able to crash PHP :)

The following line produces the crash:
$img = str_replace("/usr/local/www", "", $img);

$img is set to "/usr/local/www/swc/image.jpg"

httpd-error.log:
httpd in realloc(): warning: chunk is already free.
[Tue Jan  5 12:00:17 1999] [notice] httpd: child pid 24100 exit signal Segmentation fault (11)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-01-08 10:56 UTC] sas
realloc was used improperly which could bite users on some platforms. Please grab an actual copy of the PHP CVS tree and tell us, if it cures your problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 14:01:31 2024 UTC