php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23053 preg_match cause PHP overload the CPU
Submitted: 2003-04-04 09:09 UTC Modified: 2003-04-09 06:38 UTC
From: php at soundofos dot demon dot nl Assigned:
Status: No Feedback Package: PCRE related
PHP Version: 4.3.1 OS: windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at soundofos dot demon dot nl
New email:
PHP Version: OS:

 

 [2003-04-04 09:09 UTC] php at soundofos dot demon dot nl
According to the documenmtation,preg_match can handle Arrays
But this will cause PHP to lock up the computer.

$regExp = "/((\/\*)+([\*]*\s*)+(\w+ *)+([\*]\s*(\*+\/{1}))+){1}/";
$file = file($obj->fileLocation);
$sql = preg_replace($regExp,"",$file);
I have tried imploding the array obtained from file() first
but the result was the same.

Maybe i should mention that PHP is running in CGI mode.

regards,

Ed Hofrichter

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-04 10:51 UTC] sniper@php.net
Please provide a self-contained example script.
(tested your script with using some random file and it works just fine)

 [2003-04-09 06:38 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC