[Pcre-svn] [1068] code/trunk: Fix small bug in new Unicode g…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1068] code/trunk: Fix small bug in new Unicode group name logic.
Revision: 1068
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1068
Author:   ph10
Date:     2019-02-07 17:29:50 +0000 (Thu, 07 Feb 2019)
Log Message:
-----------
Fix small bug in new Unicode group name logic.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/src/pcre2_compile.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2019-02-06 19:02:23 UTC (rev 1067)
+++ code/trunk/ChangeLog    2019-02-07 17:29:50 UTC (rev 1068)
@@ -122,7 +122,8 @@
 processing or a crash could result.


30. When PCRE2_UTF is set, allow non-ASCII letters and decimal digits in group
-names, as Perl does.
+names, as Perl does. There was a small bug in this new code, found by
+ClusterFuzz 12950, fixed before release.


Version 10.32 10-September-2018

Modified: code/trunk/src/pcre2_compile.c
===================================================================
--- code/trunk/src/pcre2_compile.c    2019-02-06 19:02:23 UTC (rev 1067)
+++ code/trunk/src/pcre2_compile.c    2019-02-07 17:29:50 UTC (rev 1068)
@@ -2246,8 +2246,8 @@
     if (type != ucp_Nd && PRIV(ucp_gentype)[type] != ucp_L &&
         c != CHAR_UNDERSCORE) break;
     ptr++;
+    if (ptr >= ptrend) break;
     FORWARDCHAR(ptr);
-    if (ptr >= ptrend) break;
     GETCHAR(c, ptr);
     type = UCD_CHARTYPE(c);
     }