summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>2008-11-16 15:14:30 -0800
committerH.Merijn Brand <h.m.brand@xs4all.nl>2008-11-17 07:33:24 +0000
commitec93b65fd8c6a7ae08d0f88100de0c755ed21a94 (patch)
tree1a605d52243cd606d89fa89570b5a69bc21070da /pp.c
parentd10ced8a0718a50590450dfb6f8db4eb7511a2e4 (diff)
downloadperl-ec93b65fd8c6a7ae08d0f88100de0c755ed21a94.tar.gz
Re: [perl #59998] [PATCH] crypt() returns tainted data even when input strings are detainted
Message-ID: <20081117071429.GD5495@tytlal.topaz.cx> p4raw-id: //depot/perl@34860
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/pp.c b/pp.c
index 739a457936..166c315d8f 100644
--- a/pp.c
+++ b/pp.c
@@ -2553,7 +2553,7 @@ PP(pp_complement)
sv_usepvn_flags(TARG, (char*)result, nchar, SV_HAS_TRAILING_NUL);
SvUTF8_off(TARG);
}
- SETs(TARG);
+ SETTARG;
RETURN;
}
#ifdef LIBERAL
@@ -2569,8 +2569,7 @@ PP(pp_complement)
#endif
for ( ; anum > 0; anum--, tmps++)
*tmps = ~*tmps;
-
- SETs(TARG);
+ SETTARG;
}
RETURN;
}
@@ -3514,7 +3513,7 @@ PP(pp_crypt)
# else
sv_setpv(TARG, PerlProc_crypt(tmps, SvPV_nolen_const(right)));
# endif
- SETs(TARG);
+ SETTARG;
RETURN;
#else
DIE(aTHX_
@@ -3899,9 +3898,7 @@ PP(pp_quotemeta)
}
else
sv_setpvn(TARG, s, len);
- SETs(TARG);
- if (SvSMAGICAL(TARG))
- mg_set(TARG);
+ SETTARG;
RETURN;
}