Call xmalloc before realloc
authorEric Andersen <andersen@codepoet.org>
Mon, 19 Nov 2001 10:49:30 +0000 (10:49 -0000)
committerEric Andersen <andersen@codepoet.org>
Mon, 19 Nov 2001 10:49:30 +0000 (10:49 -0000)
findutils/xargs.c

index 5d64d0c9f742147dca842adc5e889a5f08f6c01b..c63518fe545225a0eec0912a0da308e6a214843f 100644 (file)
@@ -50,6 +50,7 @@ int xargs_main(int argc, char **argv)
                /* concatenate all the arguments passed to xargs together */
                int i;
                int len = 1; /* for the '\0' */
+               cmd_to_be_executed = xmalloc(80);
                for (i = 1; i < argc; i++) {
                        len += strlen(argv[i]);
                        len += 1;  /* for the space between the args */