summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-07-15 16:14:32 +0300
committerH.Merijn Brand <h.m.brand@xs4all.nl>2006-07-15 11:53:36 +0000
commit83b6a24981a127dcd2081ef7fc02666a13faf06d (patch)
tree74953202209cd3371cc54464d6300b2dea41d77a /pp_sys.c
parent4d1f1462199a37515ce79a6549d944741a1adab1 (diff)
downloadperl-83b6a24981a127dcd2081ef7fc02666a13faf06d.tar.gz
various safety/portability tweaks
Message-ID: <44B8C008.4030300@iki.fi> p4raw-id: //depot/perl@28578
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index a5028ba7b1..d0b3b10da5 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3589,7 +3589,8 @@ S_dooneliner(pTHX_ const char *cmd, const char *filename)
*s++ = '\\';
*s++ = *filename++;
}
- strcpy(s, " 2>&1");
+ if (s - cmdline < size)
+ my_strlcpy(s, " 2>&1", size - (s - cmdline));
myfp = PerlProc_popen(cmdline, "r");
Safefree(cmdline);