php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1352 ereg with uninitialized third argument crashes apache
Submitted: 1999-04-27 09:13 UTC Modified: 1999-09-03 12:56 UTC
From: jlehrke at ecrc dot de Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.7 OS: SPARC-Solaris2.6
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: jlehrke at ecrc dot de
New email:
PHP Version: OS:

 

 [1999-04-27 09:13 UTC] jlehrke at ecrc dot de
I compiled php3 as Apache module for apache-3.1.6 with apxs.
The following code segment from HORDE crashes the apache process
executing the code each time:
function set_env_in_string($text) {
    
    /* skip any comment lines */
    if(ereg("([^#]*)#.*", $text, $regs)) {
	...
    }
}

I found that this is beause $regs is undefined. If you initialize with
$regs =""; all works fine.

Any ideas?

	J"org


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-13 21:38 UTC] sas at cvs dot php dot net
Works perfectly for me. Could you provide a backtrace?
 [1999-09-03 12:56 UTC] rasmus at cvs dot php dot net
This was most likely due to the fact that the apxs build did not pick up the HSREGEX setting in Apache.  This was fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 21:01:30 2024 UTC