diff options
author | Hugo van der Sanden <hv@crypt.org> | 2015-02-10 02:09:13 +0000 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2015-02-10 02:17:07 +0000 |
commit | 7082c44063b6e00b0bad96f3d8adec0946f1938c (patch) | |
tree | 434c1c111ac1603b8cc929fd45e78cce4fc725fc /regcomp.c | |
parent | 47c2f9f1b715c476e20d480ef9540b2af28ec283 (diff) | |
download | perl-7082c44063b6e00b0bad96f3d8adec0946f1938c.tar.gz |
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.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |