From:             [EMAIL PROTECTED]
Operating system: RedHat Linux
PHP version:      4.2.3
PHP Bug Type:     Reproducible crash
Bug description:  ereg causes segfaults

executing the following line:

ereg("(idea|era|plus)=([0-9]{9}|[0-9]{11})", $forfile, $regs);

where 

$forfile = '   \bsg\n\n"|/usr/bin/sendsms4
-idea=xxxxxxxxx"\n\n\n\n\n\n\n\n\n'

caused segfaults on my server.

Changed to preg_match works fine.


Configure string:
'./configure' '--with-mysql=/usr/local' '--with-pgsql=/usr/local/pgsql'
'--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc' '--with-dbase'
'--enable-track-vars' '--with-system-regex' '--enable-trans-sid'
'--with-gd=/usr/local/src/gd-2.0.1gif' '--with-jpeg-dir' '--with-zlib-dir'
'--with-expat=/usr/local/src/expat-1.95.1/'
'--with-interbase=/usr/local/src/Interbase' '--with-gettext' '--with-xml'
'--with-imap=/usr/local/src/imap/imap-2002.RC2' '--with-png-dir'
'--with-curl'
'--with-freetype-dir=/usr/local/src/freetype-2.1.2/freetype-2.1.2'
'--with-ttf' '--enable-gd-native-ttf'
-- 
Edit bug report at http://bugs.php.net/?id=21057&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21057&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21057&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21057&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21057&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21057&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21057&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21057&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21057&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21057&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21057&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21057&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21057&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21057&r=isapi

Reply via email to