summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2020-04-21 11:50:18 +0100
committerHugo van der Sanden <hv@crypt.org>2020-10-08 13:11:28 +0100
commit4f0d304ec835f478a4dd9b4ab7af01f5b826c6d7 (patch)
tree79ad3fd51d093c92fbc1ca5ecf2e200c08312f0c /regexec.c
parentfc7dfe8e82a76ba43c4f26b3f9c069ce79341048 (diff)
downloadperl-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.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/regexec.c b/regexec.c
index 47e283305f..5d3c465281 100644
--- a/regexec.c
+++ b/regexec.c
@@ -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 */