OS/2 update
[p5sagit/p5-mst-13.2.git] / taint.c
diff --git a/taint.c b/taint.c
index c8c6800..3ce0942 100644 (file)
--- a/taint.c
+++ b/taint.c
@@ -10,6 +10,7 @@
 void
 taint_proper(const char *f, char *s)
 {
+    dTHR;      /* just for taint */
     char *ug;
 
     DEBUG_u(PerlIO_printf(Perl_debug_log,
@@ -54,10 +55,12 @@ taint_env(void)
        if (!svp || *svp == &sv_undef)
            break;
        if (SvTAINTED(*svp)) {
+           dTHR;
            TAINT;
            taint_proper("Insecure %s%s", "$ENV{DCL$PATH}");
        }
        if ((mg = mg_find(*svp, 'e')) && MgTAINTEDDIR(mg)) {
+           dTHR;
            TAINT;
            taint_proper("Insecure directory in %s%s", "$ENV{DCL$PATH}");
        }
@@ -68,10 +71,12 @@ taint_env(void)
     svp = hv_fetch(GvHVn(envgv),"PATH",4,FALSE);
     if (svp && *svp) {
        if (SvTAINTED(*svp)) {
+           dTHR;
            TAINT;
            taint_proper("Insecure %s%s", "$ENV{PATH}");
        }
        if ((mg = mg_find(*svp, 'e')) && MgTAINTEDDIR(mg)) {
+           dTHR;
            TAINT;
            taint_proper("Insecure directory in %s%s", "$ENV{PATH}");
        }
@@ -81,6 +86,7 @@ taint_env(void)
     /* tainted $TERM is okay if it contains no metachars */
     svp = hv_fetch(GvHVn(envgv),"TERM",4,FALSE);
     if (svp && *svp && SvTAINTED(*svp)) {
+       dTHR;   /* just for taint */
        bool was_tainted = tainted;
        char *t = SvPV(*svp, na);
        char *e = t + na;
@@ -99,6 +105,7 @@ taint_env(void)
     for (e = misc_env; *e; e++) {
        svp = hv_fetch(GvHVn(envgv), *e, strlen(*e), FALSE);
        if (svp && *svp != &sv_undef && SvTAINTED(*svp)) {
+           dTHR;       /* just for taint */
            TAINT;
            taint_proper("Insecure $ENV{%s}%s", *e);
        }