diff options
author | Greg Hudson <ghudson@mit.edu> | 2018-05-05 13:40:37 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2018-10-28 22:50:09 -0400 |
commit | c30d5d9daadf6dbf9b987c02463669a2df991868 (patch) | |
tree | b0462a0d315a4e3ab4894ea0d9252f97da6eb401 | |
parent | 9c70a33b30919c217167b5e2191c871229e5abbf (diff) | |
download | krb5-c30d5d9daadf6dbf9b987c02463669a2df991868.zip krb5-c30d5d9daadf6dbf9b987c02463669a2df991868.tar.gz krb5-c30d5d9daadf6dbf9b987c02463669a2df991868.tar.bz2 |
Escape curly braces in def-check.pl regexes
Recent versions of Perl issue a warning or error when an unescaped
open curly brace is used in a position where it might introduce a
quantifier in a regular expression. Escape all regexp literal curly
braces in def-check.pl.
(cherry picked from commit 523e4ab050b13404a6929cc56ef873de8023e25c)
ticket: 8677
version_fixed: 1.15.4
-rw-r--r-- | src/util/def-check.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/def-check.pl b/src/util/def-check.pl index a807e6e..ccdf8ef 100644 --- a/src/util/def-check.pl +++ b/src/util/def-check.pl @@ -62,7 +62,7 @@ while (! $h->eof()) { next LINE; } s/#.*$//; - if (/^} *$/) { + if (/^\} *$/) { next LINE; } # strip comments @@ -86,18 +86,18 @@ while (! $h->eof()) { if (/^[ \t]*$/) { next LINE; } - if (/^ *extern "C" {/) { + if (/^ *extern "C" \{/) { next LINE; } s/KRB5_ATTR_DEPRECATED//; # elide struct definitions Struct1: - if (/{[^}]*}/) { - s/{[^}]*}/ /g; + if (/\{[^}]*\}/) { + s/\{[^}]*\}/ /g; goto Struct1; } # multi-line defs - if (/{/) { + if (/\{/) { $_ .= "\n"; $len1 = length; $_ .= $h->getline(); |