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
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: 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

Pull Requests

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: Sat Sep 28 13:01:27 2024 UTC