summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-07-15 07:31:45 +0000
committerrillig <rillig@pkgsrc.org>2006-07-15 07:31:45 +0000
commit927385d0c21b890bca7762eb17824325c1bcffec (patch)
tree649136c4bbee76acc80d584f9c8033757c66245d /pkgtools
parent49161c4846327a262b30e0ee15ab2efe81137ab2 (diff)
downloadpkgsrc-927385d0c21b890bca7762eb17824325c1bcffec.tar.gz
Fixed the regular expression again. Now the stack limits are 1024 kB for
wip/gforge and 256 kB for databases/pgadmin3.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index f427ff7ef97..d3e18981bb6 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.647 2006/07/15 06:57:51 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.648 2006/07/15 07:31:45 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1756,7 +1756,9 @@ use constant regex_pkgname => qr"^((?:[\w.+]|-[^\d])+)-(\d(?:\w|\.\d)*)$";
use constant regex_shellcmd => qr"^\t(.*)$";
use constant regex_unresolved => qr"\$\{";
use constant regex_validchars => qr"[\011\040-\176]";
-use constant regex_varassign => qr"^([-*+A-Z_a-z0-9.\${}\[]+?)\s*(=|\?=|\+=|:=|!=)\s*((?:\\#|[^#]+)*?)(?:\s*(#.*))?$";
+# Note: the following regular expression looks more complicated than
+# necessary to avoid a stack overflow in the Perl interpreter.
+use constant regex_varassign => qr"^([-*+A-Z_a-z0-9.\${}\[]+?)\s*(=|\?=|\+=|:=|!=)\s*((?:[^\\#\s]+|\s+?|(?:\\#)+|\\)*?)(?:\s*(#.*))?$";
use constant regex_sh_varassign => qr"^([A-Z_a-z][0-9A-Z_a-z]*)=";
# The following "constants" are often used in contexts where