Rekursion in scripts/locales.pl verhindern.
authorSven Schöling <s.schoeling@linet-services.de>
Wed, 5 Jun 2013 13:32:10 +0000 (15:32 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Wed, 5 Jun 2013 13:34:49 +0000 (15:34 +0200)
Problem war ein leakendes $', wenn ein Regex fehlgeschlagen ist.

scripts/locales.pl

index c4adf1c..9e6a4ae 100755 (executable)
@@ -444,8 +444,11 @@ sub scanfile {
           }
         }
 
-        my ($found) = / (?: locale->text | \b t8 ) \b .*? \(/x;
-        $postmatch = "$'";
+        my $found;
+        if (/ (?: locale->text | \b t8 ) \b .*? \(/x) {
+          $found     = 1;
+          $postmatch = "$'";
+        }
 
         if ($found) {
           my $string;