In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/f2e32b2c677945ce6a36531a7cd5696dc1ca2cef?hp=cd478ec9347b67c2eba38dd567a139c416b84793>

- Log -----------------------------------------------------------------
commit f2e32b2c677945ce6a36531a7cd5696dc1ca2cef
Author: Karl Williamson <[email protected]>
Date:   Sat Jul 16 21:48:02 2016 -0600

    PATCH: [perl #128170] Assert fail in regcomp.c
    
    This fixes a regression in 5.24, bisected to commit
    
    commit cfbef7dc3bfb89e4ed2c00ea9c9e3bcfd0b170fd
    Author: Karl Williamson <[email protected]>
    Date:   Wed Feb 10 16:27:13 2016 -0700
    
    regcomp.c: Fix some parsing glitches
-----------------------------------------------------------------------

Summary of changes:
 regcomp.c       | 5 ++++-
 t/re/reg_mesg.t | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/regcomp.c b/regcomp.c
index 33d5f7a..c2b398d 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -10859,7 +10859,10 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 
*flagp,U32 depth)
                 RExC_seen |= REG_LOOKBEHIND_SEEN;
                RExC_in_lookbehind++;
                RExC_parse++;
-                assert(RExC_parse < RExC_end);
+                if (RExC_parse >= RExC_end) {
+                    vFAIL("Sequence (?... not terminated");
+                }
+
                 /* FALLTHROUGH */
            case '=':           /* (?=...) */
                RExC_seen_zerolen++;
diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t
index e3c11ba..3cf1d12 100644
--- a/t/re/reg_mesg.t
+++ b/t/re/reg_mesg.t
@@ -277,6 +277,7 @@ my @death =
  '/(?xmsixp:abc)/' => 'Only one /x regex modifier is allowed {#} 
m/(?xmsixp{#}:abc)/',
  '/(?xmsixp)abc/' => 'Only one /x regex modifier is allowed {#} 
m/(?xmsixp{#})abc/',
  '/(?xxxx:abc)/' => 'Only one /x regex modifier is allowed {#} 
m/(?xxxx{#}:abc)/',
+ '/(?<=/' => 'Sequence (?... not terminated {#} m/(?<={#}/',                   
     # [perl #128170]
 
 );
 

--
Perl5 Master Repository

Reply via email to