[PHP-DEV] Bug #1352: ereg with uninitialized third argument crashes apache From: jlehrke <email protected>
Date: 04/27/99

From: jlehrke <email protected>
Operating system: SPARC-Solaris2.6
PHP version: 3.0.7
PHP Bug Type: Reproduceable crash
Bug description: ereg with uninitialized third argument crashes apache

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

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>