]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- avoid deadloops with preg_match
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 10 Mar 2010 21:47:17 +0000 (21:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-php-requires.php -> 1.16

rpm-php-requires.php

index 7b3c536c564af5fc45787d43a7e71870acd3499b..0e21d6763aa91e8a3ae4ef5be4be0f8affb4a202 100644 (file)
@@ -43,7 +43,7 @@ function peardeps($files) {
                                continue;
                        }
 
-                       while (preg_match("/(\W|^)(require|include)(_once)?
+                       if (preg_match("/(\W|^)(require|include)(_once)?
                                        \s* \(? \s*
                                        (\"([^\"]*)\"|'([^']*)')
                                        \s* \)? \s* ;/x", $line, $m)) {
@@ -71,7 +71,7 @@ function peardeps($files) {
                                continue;
                        }
 
-                       while (preg_match("/(\W|^)(require|include)(_once)?
+                       if (preg_match("/(\W|^)(require|include)(_once)?
                                        \s* \(? \s* dirname \s* \( \s* __FILE__ \s* \) \s* \. \s*
                                        (\"([^\"]*)\"|'([^']*)')
                                        \s* \)? \s* ;/x", $line, $m)) {
This page took 0.116583 seconds and 4 git commands to generate.