+ "Remote option must start with a dash: %s\n", arg);
+ return 0;
+ }
-+ if (remote_option_cnt+3 > remote_option_alloc) {
++ if (remote_option_cnt+2 >= remote_option_alloc) {
+ remote_option_alloc += 16;
+ remote_options = realloc_array(remote_options,
+ const char *, remote_option_alloc);
case OPT_WRITE_BATCH:
/* batch_name is already set */
write_batch = 1;
-@@ -1826,6 +1852,11 @@ void server_options(char **args, int *argc_p)
- #endif
+@@ -1832,6 +1858,11 @@ void server_options(char **args, int *argc_p)
+
argstr[x] = '\0';
+ if (x > (int)sizeof argstr) { /* Not possible... */
args[ac++] = argstr;
#ifdef ICONV_OPTION
-@@ -2048,6 +2079,21 @@ void server_options(char **args, int *argc_p)
+@@ -2053,6 +2084,21 @@ void server_options(char **args, int *argc_p)
else if (remove_source_files)
args[ac++] = "--remove-sent-files";