In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/7082c44063b6e00b0bad96f3d8adec0946f1938c?hp=47c2f9f1b715c476e20d480ef9540b2af28ec283>

- Log -----------------------------------------------------------------
commit 7082c44063b6e00b0bad96f3d8adec0946f1938c
Author: Hugo van der Sanden <[email protected]>
Date:   Tue Feb 10 02:09:13 2015 +0000

    regcomp can read past end of string after parsing flags
    
    New test in 8a6d8ec6fe revealed additional code problem reading past
    end of string under clang with sanitize=address.
-----------------------------------------------------------------------

Summary of changes:
 regcomp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/regcomp.c b/regcomp.c
index e069a15..9e1fab9 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -10414,7 +10414,8 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 
*flagp,U32 depth)
               parse_flags:
                parse_lparen_question_flags(pRExC_state);
                 if (UCHARAT(RExC_parse) != ':') {
-                    nextchar(pRExC_state);
+                    if (*RExC_parse)
+                        nextchar(pRExC_state);
                     *flagp = TRYAGAIN;
                     return NULL;
                 }

--
Perl5 Master Repository

Reply via email to