php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21057 ereg causes segfaults
Submitted: 2002-12-16 18:49 UTC Modified: 2002-12-17 03:20 UTC
From: kjanisz at fr dot pl Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.2.3 OS: RedHat Linux
Private report: No CVE-ID: None
 [2002-12-16 18:49 UTC] kjanisz at fr dot pl
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'

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-16 19:02 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-12-16 19:24 UTC] kjanisz at fr dot pl
Tried on latest CVS - still causes segfaults.
 [2002-12-16 19:26 UTC] iliaa@php.net
Could you please email the segfaulting script, because using the information provided in your report I cannot make it crash with 4.3.0RC3
 [2002-12-17 03:20 UTC] edink@php.net
Remove --with-system-regex from your configure options and the problem should disappear.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Aug 14 11:01:29 2024 UTC