X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/ab5ffac0b5b90b65432ee6491f5c8cf94a3b0e18..e2e42a01ba5a2258edf1510280bb83864a0c8748:/remote-option.diff diff --git a/remote-option.diff b/remote-option.diff index 481361a..cc1ccc1 100644 --- a/remote-option.diff +++ b/remote-option.diff @@ -52,7 +52,7 @@ diff --git a/options.c b/options.c + "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); @@ -68,8 +68,8 @@ diff --git a/options.c b/options.c 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... */ @@ -80,7 +80,7 @@ diff --git a/options.c b/options.c 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";