summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2005-07-05 13:01:23 +0000
committerDave Mitchell <davem@fdisolutions.com>2005-07-05 13:01:23 +0000
commit0a9c116bfa42170e9d3c7c016bde0fa21582b1b5 (patch)
treeec535081e8471124c99d038d240df9ff4aed5621 /mg.c
parent13330d4dbde017a5cb6fe72e1a42ab42c9e98501 (diff)
downloadperl-0a9c116bfa42170e9d3c7c016bde0fa21582b1b5.tar.gz
change 24943 broke restoration of localized taint values
p4raw-id: //depot/perl@25081
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mg.c b/mg.c
index 086ab9ab1b..9ae88c428f 100644
--- a/mg.c
+++ b/mg.c
@@ -1921,10 +1921,13 @@ int
Perl_magic_settaint(pTHX_ SV *sv, MAGIC *mg)
{
PERL_UNUSED_ARG(sv);
- if (PL_tainted)
- mg->mg_len |= 1;
- else
- mg->mg_len &= ~1;
+ /* update taint status unless we're restoring at scope exit */
+ if (PL_localizing != 2) {
+ if (PL_tainted)
+ mg->mg_len |= 1;
+ else
+ mg->mg_len &= ~1;
+ }
return 0;
}