summaryrefslogtreecommitdiff
path: root/taint.c
diff options
context:
space:
mode:
Diffstat (limited to 'taint.c')
-rw-r--r--taint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/taint.c b/taint.c
index 66affdde86..23a1b07a39 100644
--- a/taint.c
+++ b/taint.c
@@ -42,10 +42,11 @@ taint_env()
SV** svp;
if (tainting) {
+ MAGIC *mg = 0;
svp = hv_fetch(GvHVn(envgv),"PATH",4,FALSE);
- if (!svp || *svp == &sv_undef || mg_find(*svp, 't')) {
+ if (!svp || *svp == &sv_undef || (mg = mg_find(*svp, 't'))) {
tainted = 1;
- if (SvPRIVATE(*svp) & SVp_TAINTEDDIR)
+ if (mg && MgTAINTEDDIR(mg))
taint_proper("Insecure directory in %s%s", "PATH");
else
taint_proper("Insecure %s%s", "PATH");