diff options
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 |