summaryrefslogtreecommitdiff
path: root/taint.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-11-04 20:47:34 +0000
committerNicholas Clark <nick@ccl4.org>2005-11-04 20:47:34 +0000
commit86c11942206ec09dd2a486bb22552aa2f170e322 (patch)
treeda93ee724d8086efae3d2841ff113c9bcaa813f9 /taint.c
parentca563b4e7524b82fcbffcbe3344a4a9d20a7ab64 (diff)
downloadperl-86c11942206ec09dd2a486bb22552aa2f170e322.tar.gz
Use the return value from sprintf().
p4raw-id: //depot/perl@26001
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 e0869a9bad..ed1af7453b 100644
--- a/taint.c
+++ b/taint.c
@@ -107,11 +107,12 @@ Perl_taint_env(pTHX)
{
int i = 0;
char name[10 + TYPE_DIGITS(int)] = "DCL$PATH";
+ STRLEN len = 8; /* strlen(name) */
while (1) {
if (i)
- (void)sprintf(name,"DCL$PATH;%d", i);
- svp = hv_fetch(GvHVn(PL_envgv), name, strlen(name), FALSE);
+ len = my_sprintf(name,"DCL$PATH;%d", i);
+ svp = hv_fetch(GvHVn(PL_envgv), name, len, FALSE);
if (!svp || *svp == &PL_sv_undef)
break;
if (SvTAINTED(*svp)) {