diff options
author | rillig <rillig> | 2006-07-15 07:31:45 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-07-15 07:31:45 +0000 |
commit | 6d31d886b7525f795b6564fc2e3054c131b65e36 (patch) | |
tree | 649136c4bbee76acc80d584f9c8033757c66245d /pkgtools/pkglint | |
parent | 6cf389b57474f8a8ddc98053aabf1c203f44db8e (diff) | |
download | pkgsrc-6d31d886b7525f795b6564fc2e3054c131b65e36.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/pkglint')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 6 |
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 |