summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-03-27 12:39:57 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-28 03:46:14 +0000
commitaf6f566ede304ed0d544d51e1e8e01bc3184a3f4 (patch)
tree008517d43ba9dc95a6c86d1fa279a08d3c87d374 /regcomp.c
parent637201361971914235010f2d901f2582381dfba1 (diff)
downloadperl-af6f566ede304ed0d544d51e1e8e01bc3184a3f4.tar.gz
Re: Regex-Unicode bugs
Message-Id: <200203271239.g2RCdvL31355@crypt.compulink.co.uk> p4raw-id: //depot/perl@15573
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 12f9016a4b..c124d48405 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2970,8 +2970,11 @@ tryagain:
}
RExC_end++;
}
- else
+ else {
RExC_end = RExC_parse + 2;
+ if (RExC_end > oldregxend)
+ RExC_end = oldregxend;
+ }
RExC_parse--;
ret = regclass(pRExC_state);
@@ -3593,6 +3596,8 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state)
case 'D': namedclass = ANYOF_NDIGIT; break;
case 'p':
case 'P':
+ if (RExC_parse >= RExC_end)
+ vFAIL("Empty \\p{}");
if (*RExC_parse == '{') {
U8 c = (U8)value;
e = strchr(RExC_parse++, '}');