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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sat May 18 20:01:34 2024 UTC