From: Dave Mitchell Date: Wed, 22 Jun 2005 23:08:55 +0000 (+0000) Subject: remove taint hack now that local $tainted no longer copies taint magic X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ddb8a4f4f1b3a40180e5c6cbdedb1603f75421c;p=p5sagit%2Fp5-mst-13.2.git remove taint hack now that local $tainted no longer copies taint magic p4raw-id: //depot/perl@24943 --- diff --git a/mg.c b/mg.c index 3669619..96644fb 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; diff --git a/sv.c b/sv.c index 4cdfacc..3888ce0 100644 --- a/sv.c +++ b/sv.c @@ -8472,7 +8472,7 @@ Perl_sv_tainted(pTHX_ SV *sv) { if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) { MAGIC * const mg = mg_find(sv, PERL_MAGIC_taint); - if (mg && ((mg->mg_len & 1) || ((mg->mg_len & 2) && mg->mg_obj == sv))) + if (mg && (mg->mg_len & 1) ) return TRUE; } return FALSE;