---- main.c 19 May 2004 22:19:19 -0000 1.195
-+++ main.c 29 May 2004 21:31:47 -0000
-@@ -217,7 +217,7 @@ static pid_t do_cmd(char *cmd, char *mac
- int *f_in, int *f_out)
- {
- int i, argc = 0;
-- char *args[100];
-+ char *args[MAX_ARGS];
- pid_t ret;
- char *tok, *dir = NULL;
- int dash_l_set = 0;
-@@ -232,8 +232,13 @@ static pid_t do_cmd(char *cmd, char *mac
- if (!cmd)
- goto oom;
-
-- for (tok = strtok(cmd, " "); tok; tok = strtok(NULL, " "))
-+ for (tok = strtok(cmd, " "); tok; tok = strtok(NULL, " ")) {
-+ if (argc >= MAX_ARGS) {
-+ rprintf(FERROR, "Command is too long\n");
-+ exit_cleanup(RERR_SYNTAX);
-+ }
- args[argc++] = tok;
-+ }
-
- /* check to see if we've already been given '-l user' in
- * the remote-shell command */
-@@ -296,7 +301,7 @@ static pid_t do_cmd(char *cmd, char *mac
- create_flist_from_batch(); /* sets batch_flist */
+--- orig/main.c 2005-01-14 18:30:18
++++ main.c 2004-07-22 00:31:47
+@@ -334,7 +334,7 @@ static pid_t do_cmd(char *cmd, char *mac
+ whole_file = 1;