diff options
author | Steve Peters <steve@fisharerojo.org> | 2006-07-10 17:23:02 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-07-10 17:23:02 +0000 |
commit | 6fca0082ec4f3b34a0dabc78331bad8c22489dd2 (patch) | |
tree | 5b5f73a8bc38c7378f649cb017829d8c6a07563c /doio.c | |
parent | 5b38b9cdaffc29c5d28feb5763086264c6c2360a (diff) | |
download | perl-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.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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++; |