aboutsummaryrefslogtreecommitdiff
path: root/findutils/xargs.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-11-19 10:49:30 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-11-19 10:49:30 +0000
commit44760fe6bbe3559fcde1e1dfc1d8b377db819239 (patch)
tree3416c9abee1a69819dc28f515182b58bac087c53 /findutils/xargs.c
parent449c0cfa595469e7961c8d04d667ef20aa75490a (diff)
downloadbusybox-w32-44760fe6bbe3559fcde1e1dfc1d8b377db819239.tar.gz
busybox-w32-44760fe6bbe3559fcde1e1dfc1d8b377db819239.tar.bz2
busybox-w32-44760fe6bbe3559fcde1e1dfc1d8b377db819239.zip
Call xmalloc before realloc
git-svn-id: svn://busybox.net/trunk/busybox@3712 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'findutils/xargs.c')
-rw-r--r--findutils/xargs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c
index 5d64d0c9f..c63518fe5 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -50,6 +50,7 @@ int xargs_main(int argc, char **argv)
50 /* concatenate all the arguments passed to xargs together */ 50 /* concatenate all the arguments passed to xargs together */
51 int i; 51 int i;
52 int len = 1; /* for the '\0' */ 52 int len = 1; /* for the '\0' */
53 cmd_to_be_executed = xmalloc(80);
53 for (i = 1; i < argc; i++) { 54 for (i = 1; i < argc; i++) {
54 len += strlen(argv[i]); 55 len += strlen(argv[i]);
55 len += 1; /* for the space between the args */ 56 len += 1; /* for the space between the args */