php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1696 ereg function crashes php if first arg is empty
Submitted: 1999-07-12 13:40 UTC Modified: 1999-11-28 17:45 UTC
From: danbeck at mtginfo dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0 Latest CVS (12/07/1999) OS: Linux 2.0.36 (RedHat 5.2)
Private report: No CVE-ID: None
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:
36 - 18 = ?
Subscribe to this entry?

 
 [1999-07-12 13:40 UTC] danbeck at mtginfo dot com
This snippit of code:

$arg1 = "";
$arg2 = "TEST";
if (ereg($arg1, $arg2, $results)):
   echo "CRASH!";
endif;

causes php to stop execution (crash).  This only happens if the first argument does not contain anything.  No data is sent to the browser...

This is reproducable every time.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-28 17:45 UTC] rasmus at cvs dot php dot net
Fixed a while ago.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 09:01:32 2025 UTC