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 /pp_sys.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 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -3580,10 +3580,11 @@ S_dooneliner(pTHX_ const char *cmd, const char *filename) char *s; PerlIO *myfp; int anum = 1; + Size_t size = strlen(cmd) + (strlen(filename) * 2) + 10; - Newx(cmdline, strlen(cmd) + (strlen(filename) * 2) + 10, char); - strcpy(cmdline, cmd); - strcat(cmdline, " "); + Newx(cmdline, size, char); + my_strlcpy(cmdline, cmd, size); + my_strlcat(cmdline, " ", size); for (s = cmdline + strlen(cmdline); *filename; ) { *s++ = '\\'; *s++ = *filename++; |