summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorInaba Hiroto <inaba@st.rim.or.jp>2001-05-25 19:25:36 +0900
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-25 01:07:59 +0000
commite49a9654d37283a906bdcb779ea9c6e236835955 (patch)
tree638af82c804f6aac6244663964bbe826602469ca /regexec.c
parentaf09ea45cb052770572c0a2caa4e487853f703c8 (diff)
downloadperl-e49a9654d37283a906bdcb779ea9c6e236835955.tar.gz
Re: [ID 20010506.041] segfault when matching utf8 string
Message-Id: <200105250124.KAA19571@toshiba.co.jp> p4raw-id: //depot/perl@10206
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/regexec.c b/regexec.c
index 9ba61d74be..7c168cf538 100644
--- a/regexec.c
+++ b/regexec.c
@@ -144,6 +144,9 @@ S_regcppush(pTHX_ I32 parenfloor)
int paren_elems_to_push = (PL_regsize - parenfloor) * REGCP_PAREN_ELEMS;
int p;
+ if (paren_elems_to_push < 0)
+ Perl_croak(aTHX_ "panic: paren_elems_to_push < 0");
+
#define REGCP_OTHER_ELEMS 5
SSCHECK(paren_elems_to_push + REGCP_OTHER_ELEMS);
for (p = PL_regsize; p > parenfloor; p--) {