summaryrefslogtreecommitdiff
path: root/taint.c
diff options
context:
space:
mode:
authorLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
committerLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
commit8990e3071044a96302560bbdb5706f3e74cf1bef (patch)
tree6cf4a58108544204591f25bd2d4f1801d49334b4 /taint.c
parented6116ce9b9d13712ea252ee248b0400653db7f9 (diff)
downloadperl-8990e3071044a96302560bbdb5706f3e74cf1bef.tar.gz
perl 5.0 alpha 6
[editor's note: cleaned up from the September '94 InfoMagic CD, just like the last commit]
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");