summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-07-10 17:23:02 +0000
committerSteve Peters <steve@fisharerojo.org>2006-07-10 17:23:02 +0000
commit6fca0082ec4f3b34a0dabc78331bad8c22489dd2 (patch)
tree5b5f73a8bc38c7378f649cb017829d8c6a07563c /doio.c
parent5b38b9cdaffc29c5d28feb5763086264c6c2360a (diff)
downloadperl-6fca0082ec4f3b34a0dabc78331bad8c22489dd2.tar.gz
Convert some low hanging fruit to my_strlcpy/my_strlcat.
p4raw-id: //depot/perl@28533
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/doio.c b/doio.c
index 1fcb165065..29b5b19f50 100644
--- a/doio.c
+++ b/doio.c
@@ -1443,10 +1443,9 @@ Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report)
char *cmd;
/* Make a copy so we can change it */
- const int cmdlen = strlen(incmd);
- Newx(cmd, cmdlen+1, char);
- strncpy(cmd, incmd, cmdlen);
- cmd[cmdlen] = 0;
+ const Size_t cmdlen = strlen(incmd) + 1;
+ Newx(cmd, cmdlen, char);
+ my_strlcpy(cmd, incmd, cmdlen);
while (*cmd && isSPACE(*cmd))
cmd++;