summaryrefslogtreecommitdiff
path: root/pp_sys.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 /pp_sys.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 'pp_sys.c')
-rw-r--r--pp_sys.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 25deca1f9e..a5028ba7b1 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -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++;