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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
21 - 14 = ?
Subscribe to this entry?

 
 [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