php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19430 ereg stops at \0
Submitted: 2002-09-16 04:39 UTC Modified: 2002-09-16 09:36 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: volker@php.net Assigned:
Status: Not a bug Package: *Regular Expressions
PHP Version: 4.2.3 OS: Linux 2.4.x
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: volker@php.net
New email:
PHP Version: OS:

 

 [2002-09-16 04:39 UTC] volker@php.net
if you have any \0 in your haystack in ereg, it stops at this point.

proof: 

<?
$string="hallo meine homepage ist www.nidura.de";
$string[10]="";
if(ereg("nidura",$string,$match))
	echo "found";
	else
	echo "not found";
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-16 09:36 UTC] sander@php.net
As stated in the manual, the ereg_* functions are not binary safe. Use the preg_* functions.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 02:01:26 2019 UTC