summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-14 11:35:04 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-14 11:35:04 +0000
commit3d82f0cdac7e45415d6eeb0eb18c4b5c1d1f1728 (patch)
tree101b9329dad3b10e8699674029d4fd1baf213874 /mg.c
parentd735c2efe0b08b05adfb893625476bf4480a2ece (diff)
downloadperl-3d82f0cdac7e45415d6eeb0eb18c4b5c1d1f1728.tar.gz
Assert that we don't access strings saved for $1 etc. out of bounds
p4raw-id: //depot/perl@29271
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mg.c b/mg.c
index 425190b974..f82aa0dae3 100644
--- a/mg.c
+++ b/mg.c
@@ -854,6 +854,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
i = t1 - s1;
s = rx->subbeg + s1;
assert(rx->subbeg);
+ assert(rx->sublen >= s1);
getrx:
if (i >= 0) {