diff options
author | Chip Salzenberg <chip@pobox.com> | 1998-02-03 04:16:50 -0500 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-02-06 14:56:30 +0000 |
commit | 85aff5773f2412a54180cc35f86370c56b65bf77 (patch) | |
tree | 58aa1481b34d450e99d317950157b92887658fa2 /pp_ctl.c | |
parent | e1c148c28bf3335bbd0ad9a2070b0917265c00c3 (diff) | |
download | perl-85aff5773f2412a54180cc35f86370c56b65bf77.tar.gz |
Some Chip patches (some tweaked to match _5x source):
Subject: [PATCH] local leakage
Date: Tue, 3 Feb 1998 09:16:50 -0500 (EST)
Subject: [PATCH] NULs in patterns
Date: Wed, 4 Feb 1998 01:33:51 -0500 (EST)
Subject: [PATCH] Configure on PerlIO
Date: Wed, 4 Feb 1998 01:38:43 -0500 (EST)
Subject: [PATCH] Avoid core dump on package alias
Date: Wed, 4 Feb 1998 15:38:42 -0500 (EST)
Subject: [PATCH] Fix name of $Foo::{'Bar::'}
Date: Wed, 4 Feb 1998 16:37:51 -0500 (EST)
p4raw-id: //depot/perl@462
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -86,10 +86,12 @@ PP(pp_regcomp) { else { t = SvPV(tmpstr, len); - /* JMR: Check against the last compiled regexp */ - if ( ! pm->op_pmregexp || ! pm->op_pmregexp->precomp - || strnNE(pm->op_pmregexp->precomp, t, len) - || pm->op_pmregexp->precomp[len]) { + /* JMR: Check against the last compiled regexp + To know for sure, we'd need the length of precomp. + But we don't have it, so we must ... take a guess. */ + if (!pm->op_pmregexp || !pm->op_pmregexp->precomp || + memNE(pm->op_pmregexp->precomp, t, len + 1)) + { if (pm->op_pmregexp) { ReREFCNT_dec(pm->op_pmregexp); pm->op_pmregexp = Null(REGEXP*); /* crucial if regcomp aborts */ |