summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2005-06-22 23:08:55 +0000
committerDave Mitchell <davem@fdisolutions.com>2005-06-22 23:08:55 +0000
commit2ddb8a4f4f1b3a40180e5c6cbdedb1603f75421c (patch)
tree4399467a8acd2643c0578e26fdf0ef837fd67427 /mg.c
parent0cbee0a449cc4e11ef8db851c20b026c8f9ff45e (diff)
downloadperl-2ddb8a4f4f1b3a40180e5c6cbdedb1603f75421c.tar.gz
remove taint hack now that local $tainted no longer copies taint magic
p4raw-id: //depot/perl@24943
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/mg.c b/mg.c
index 366961984f..96644fbb53 100644
--- a/mg.c
+++ b/mg.c
@@ -1919,8 +1919,7 @@ Perl_magic_setsubstr(pTHX_ SV *sv, MAGIC *mg)
int
Perl_magic_gettaint(pTHX_ SV *sv, MAGIC *mg)
{
- TAINT_IF((mg->mg_len & 1) ||
- ((mg->mg_len & 2) && mg->mg_obj == sv)); /* kludge */
+ TAINT_IF(mg->mg_len & 1);
return 0;
}
@@ -1928,13 +1927,7 @@ int
Perl_magic_settaint(pTHX_ SV *sv, MAGIC *mg)
{
(void)sv;
- if (PL_localizing) {
- if (PL_localizing == 1)
- mg->mg_len <<= 1;
- else
- mg->mg_len >>= 1;
- }
- else if (PL_tainted)
+ if (PL_tainted)
mg->mg_len |= 1;
else
mg->mg_len &= ~1;