In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/1c8f8eb1d500716bc7368dab00869ae3be841e0c?hp=4c0f30d62c000e3bbbd4f45eb9fd4bd4b4015cf9>

- Log -----------------------------------------------------------------
commit 1c8f8eb1d500716bc7368dab00869ae3be841e0c
Author: Karl Williamson <k...@khw-desktop.(none)>
Date:   Thu Jan 14 21:21:37 2010 -0700

    Clarify that count is bytes not unicode characters

M       regexec.c

commit c2dc4c7d5e51c6211637044820c7a560da7e6268
Author: Karl Williamson <k...@khw-desktop.(none)>
Date:   Thu Jan 14 19:19:22 2010 -0700

    Display characters as Unicode for clarity

M       t/re/pat_special_cc.t

commit 35db910f236b637e47a514ee62ca3e5a98169ddd
Author: Karl Williamson <k...@khw-desktop.(none)>
Date:   Thu Jan 14 17:36:46 2010 -0700

    Add tested for corrupted regnode

M       regcomp.c

commit 525aa6214fa98872c8e7604a6b63bd6c7914f3a4
Author: Karl Williamson <k...@khw-desktop.(none)>
Date:   Thu Jan 14 16:02:14 2010 -0700

    Use sizeof instead of hard-coded array size
    
    The array should be declared with its actual size.

M       universal.c

commit 22c985d500f518cdb601db921ea5b3edaa6c4ae6
Author: Karl Williamson <k...@khw-desktop.(none)>
Date:   Thu Jan 14 16:01:13 2010 -0700

    Typo

M       universal.c
-----------------------------------------------------------------------

Summary of changes:
 regcomp.c             |    4 ++++
 regexec.c             |    2 +-
 t/re/pat_special_cc.t |    1 +
 universal.c           |    4 ++--
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/regcomp.c b/regcomp.c
index c290fbd..ff9c582 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -9866,6 +9866,10 @@ Perl_regnext(pTHX_ register regnode *p)
     if (!p)
        return(NULL);
 
+    if (OP(p) > REGNODE_MAX) {         /* regnode.type is unsigned */
+       Perl_croak(aTHX_ "Corrupted regexp opcode %d > %d", (int)OP(p), 
(int)REGNODE_MAX);
+    }
+
     offset = (reg_off_by_arg[OP(p)] ? ARG(p) : NEXT_OFF(p));
     if (offset == 0)
        return(NULL);
diff --git a/regexec.c b/regexec.c
index 8c68639..307e274 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2200,7 +2200,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char 
*stringarg, register char *stre
                RE_PV_QUOTED_DECL(quoted,do_utf8,PERL_DEBUG_PAD_ZERO(1),
                    s,strend-s,60);
                PerlIO_printf(Perl_debug_log,
-                   "Matching stclass %.*s against %s (%d chars)\n",
+                   "Matching stclass %.*s against %s (%d bytes)\n",
                    (int)SvCUR(prop), SvPVX_const(prop),
                     quoted, (int)(strend - s));
            }
diff --git a/t/re/pat_special_cc.t b/t/re/pat_special_cc.t
index 1138cbb..36116b8 100644
--- a/t/re/pat_special_cc.t
+++ b/t/re/pat_special_cc.t
@@ -37,6 +37,7 @@ sub run_tests {
         my @plain_complement_failed;
         for my $ord (0 .. $upper_bound) {
             my $ch= chr $ord;
+            my $ord = sprintf "U+%04X", $ord;  # For display in Unicode terms
             my $plain= $ch=~/$special/ ? 1 : 0;
             my $plain_u= $ch=~/$upper/ ? 1 : 0;
             push @plain_complement_failed, "$ord-$plain-$plain_u" if $plain == 
$plain_u;
diff --git a/universal.c b/universal.c
index 79ff772..dec8505 100644
--- a/universal.c
+++ b/universal.c
@@ -1172,10 +1172,10 @@ XS(XS_re_regexp_pattern)
 
     if ((re = SvRX(ST(0)))) /* assign deliberate */
     {
-        /* Housten, we have a regex! */
+        /* Houston, we have a regex! */
         SV *pattern;
         STRLEN left = 0;
-        char reflags[6];
+        char reflags[sizeof(INT_PAT_MODS)];
 
         if ( GIMME_V == G_ARRAY ) {
             /*

--
Perl5 Master Repository

Reply via email to