diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1998-07-09 14:47:25 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-11 23:43:37 +0000 |
commit | 2cd61cdbd64958437da8294b84109bc8b63ab360 (patch) | |
tree | c77caa477be19c09cbca09e677a56b48de14cce2 /sv.c | |
parent | 1e509ade7aa6b4feabef1bbe58cd68a39b4085af (diff) | |
download | perl-2cd61cdbd64958437da8294b84109bc8b63ab360.tar.gz |
add patch, along with all the missing bits, and doc tweaks
Message-Id: <199807092247.SAA06314@monk.mps.ohio-state.edu>
Subject: Re: [PATCH 5.004_71] Secure RE update
p4raw-id: //depot/perl@1444
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1706,9 +1706,9 @@ sv_2pv(register SV *sv, STRLEN *lp) == (SVs_OBJECT|SVs_RMG)) && strEQ(s=HvNAME(SvSTASH(sv)), "Regexp") && (mg = mg_find(sv, 'r'))) { - if (!mg->mg_ptr) { - regexp *re = (regexp *)mg->mg_obj; + regexp *re = (regexp *)mg->mg_obj; + if (!mg->mg_ptr) { mg->mg_len = re->prelen + 4; New(616, mg->mg_ptr, mg->mg_len + 1, char); Copy("(?:", mg->mg_ptr, 3, char); @@ -1716,6 +1716,7 @@ sv_2pv(register SV *sv, STRLEN *lp) mg->mg_ptr[mg->mg_len - 1] = ')'; mg->mg_ptr[mg->mg_len] = 0; } + reginterp_cnt += re->program[0].next_off; *lp = mg->mg_len; return mg->mg_ptr; } |