diff options
author | Hugo van der Sanden <hv@crypt.org> | 2020-04-21 11:50:18 +0100 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2020-10-08 13:11:28 +0100 |
commit | 4f0d304ec835f478a4dd9b4ab7af01f5b826c6d7 (patch) | |
tree | 79ad3fd51d093c92fbc1ca5ecf2e200c08312f0c /regexec.c | |
parent | fc7dfe8e82a76ba43c4f26b3f9c069ce79341048 (diff) | |
download | perl-4f0d304ec835f478a4dd9b4ab7af01f5b826c6d7.tar.gz |
regexec: disallow zero-width nodes in regrepeat
GH #17594: the logic here expects the node to have width 1 (except for
LNBREAK), it is not expected to do the right thing on zero-width nodes.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -9999,25 +9999,6 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, } break; - case BOUNDL: - case NBOUNDL: - _CHECK_AND_WARN_PROBLEMATIC_LOCALE; - /* FALLTHROUGH */ - case BOUND: - case BOUNDA: - case BOUNDU: - case EOS: - case GPOS: - case KEEPS: - case NBOUND: - case NBOUNDA: - case NBOUNDU: - case OPFAIL: - case SBOL: - case SEOL: - /* These are all 0 width, so match right here or not at all. */ - break; - default: Perl_croak(aTHX_ "panic: regrepeat() called with unrecognized node type %d='%s'", OP(p), PL_reg_name[OP(p)]); NOT_REACHED; /* NOTREACHED */ |