summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>2002-01-24 13:45:44 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-24 15:44:31 +0000
commit290deeac09590d3d537138ffc29b7441c55f585a (patch)
tree1efda3b5c35de0f3aed6806b4c0d8086f4ee1b36 /pp_hot.c
parent879fa96f55d904836d80046db7f8557649d93011 (diff)
downloadperl-290deeac09590d3d537138ffc29b7441c55f585a.tar.gz
The
Subject: Very old debugger UTF-8 bug Message-ID: <m3y9iot1jr.fsf@anima.de> still broken, but this should work as a stopgap measure to stop pp_match accessing naughty data. p4raw-id: //depot/perl@14405
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 4a88348f71..1d2dffa592 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1322,6 +1322,9 @@ play_it_again:
/*SUPPRESS 560*/
if ((rx->startp[i] != -1) && rx->endp[i] != -1 ) {
len = rx->endp[i] - rx->startp[i];
+ if (rx->endp[i] < 0 || rx->startp[i] < 0 ||
+ len < 0 || len > strend - s)
+ DIE(aTHX_ "panic: pp_match start/end pointers");
s = rx->startp[i] + truebase;
sv_setpvn(*SP, s, len);
if (DO_UTF8(TARG) && is_utf8_string((U8*)s, len))