The patches for 3.0.4pre1.
[rsync/rsync-patches.git] / remote-option.diff
index 481361a..cc1ccc1 100644 (file)
@@ -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";