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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: danbeck at mtginfo dot com
New email:
PHP Version: OS:

 

 [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: Thu Jul 03 11:01:34 2025 UTC