php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1279 str_replace causes emalloc() error
Submitted: 1999-03-30 12:26 UTC Modified: 1999-03-30 15:02 UTC
From: email at destryhines dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.6 OS: NT 4.0 sp3
Private report: No CVE-ID: None
 [1999-03-30 12:26 UTC] email at destryhines dot com
<?
/*
Generated error FATAL: emalloc(): Unable to allocate -n bytes
Error occures as long as the haystack is 8 characters AND
the needle is more then 1 character AND the needle is not found 
in the haystack.
*/
print str_replace("d1","","12345678"); 
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-03-30 15:02 UTC] sas
Known deficiency in 3.0.6. This also sometimes shows up in 3.0.7 and is (hopefully) fixed in 3.0.8.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 08:01:33 2024 UTC