php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1385 apache core dumps when calling ereg_replace()
Submitted: 1999-05-07 04:27 UTC Modified: 1999-05-07 04:53 UTC
From: ch at westend dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.6 OS: SunOS 5.5.1, SPARCstation-10
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: ch at westend dot com
New email:
PHP Version: OS:

 

 [1999-05-07 04:27 UTC] ch at westend dot com
Everything (Apache 1.3.4 + PHP 3.0.6 + JavaScript) works fine.
But whenever I call the ereg_replace function, apache core dumps:

(gdb) bt
#0  0xeeac3624 in _php3_eregreplace (ht=0x102fd8, return_value=0x0, 
    list=0xffffffff, plist=0xffffffff, icase=0) at functions/reg.c:419

Seems that the internal function returns a NULL pointer instead of a 
pointer of a string.

The script is from the doku. Here it is:
<?php $a="abc123";
  $b = ereg_replace("abc", "ABC", $a);
  echo $a, $b?>

(some other regular expression functions works btw.)

read you,

  -christian-

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-07 04:53 UTC] ch at westend dot com
I just found it in the bugs database (search for the "wrong" keyword before. 
Configuring with --with-system-regex solves the problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 23 01:01:29 2024 UTC