[30336] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit [krb5-1.16]: Escape curly braces in def-check.pl regexes

daemon@ATHENA.MIT.EDU (Greg Hudson)
Tue Oct 30 12:26:10 2018

Date: Tue, 30 Oct 2018 12:25:34 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201810301625.w9UGPYn1008020@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/30043dd67b003f17266de5a61375035a238d32bd
commit 30043dd67b003f17266de5a61375035a238d32bd
Author: Greg Hudson <ghudson@mit.edu>
Date:   Sat May 5 13:40:37 2018 -0400

    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.16.2

 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();
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post