summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-12-03 09:19:32 +0000
committerNicholas Clark <nick@ccl4.org>2008-12-03 09:19:32 +0000
commit302c0c93356e52f02a8925ac90ae96bf8db31000 (patch)
tree8406b1362921eeb28fbc1df1e2e355783a0ead35 /scope.c
parenteb044b10917d0598b3201b68e4a5d3ba7d124ef3 (diff)
downloadperl-302c0c93356e52f02a8925ac90ae96bf8db31000.tar.gz
Fix for tainting regression in a test of Text::Template spotted by
Andreas' smoker. p4raw-id: //depot/perl@34987
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 1e06671647..cad14dec7b 100644
--- a/scope.c
+++ b/scope.c
@@ -648,6 +648,8 @@ Perl_leave_scope(pTHX_ I32 base)
void* ptr;
register char* str;
I32 i;
+ /* Localise the effects of the TAINT_NOT inside the loop. */
+ const bool was = PL_tainted;
if (base < -1)
Perl_croak(aTHX_ "panic: corrupt saved stack index");
@@ -1065,6 +1067,8 @@ Perl_leave_scope(pTHX_ I32 base)
Perl_croak(aTHX_ "panic: leave_scope inconsistency");
}
}
+
+ PL_tainted = was;
}
void