This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #134133] read beyond end of buffer
authorKarl Williamson <khw@cpan.org>
Fri, 24 May 2019 15:01:46 +0000 (09:01 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 22 Aug 2019 16:21:47 +0000 (10:21 -0600)
The code was using the wrong limit variable.

regcomp.c

index d61fd43..b2cc667 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -22946,7 +22946,7 @@ Perl_parse_uniprop_string(pTHX_
         /* Certain properties whose values are numeric need special handling.
          * They may optionally be prefixed by 'is'.  Ignore that prefix for the
          * purposes of checking if this is one of those properties */
-        if (memBEGINPs(lookup_name, name_len, "is")) {
+        if (memBEGINPs(lookup_name, j, "is")) {
             lookup_offset = 2;
         }