diff options
author | Karl Williamson <khw@cpan.org> | 2016-03-04 13:14:30 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-03-04 13:24:20 -0700 |
commit | ca76e4e9adfa1629d8fee4608cbeab9d9ba91ed3 (patch) | |
tree | 7ab17c5d98d2d38719e0b224724ee0747d93ed86 /regcomp.c | |
parent | 88474c07fbd1a35a58cf4b0d6a0665044ecdb7fb (diff) | |
download | perl-ca76e4e9adfa1629d8fee4608cbeab9d9ba91ed3.tar.gz |
PATCH: [perl #126141]: qr/]]]]][\\/ fails to raise error
This was due to the trailing \ trying to look at the next character
without verifying that one actually existed.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -15718,6 +15718,11 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, } else if (value == '\\') { /* Is a backslash; get the code point of the char after it */ + + if (RExC_parse >= RExC_end) { + vFAIL("Unmatched ["); + } + if (UTF && ! UTF8_IS_INVARIANT(UCHARAT(RExC_parse))) { value = utf8n_to_uvchr((U8*)RExC_parse, RExC_end - RExC_parse, |