X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/248786a4ff8434aa19cee99df2ea1331f48c401e..963ca80882dea2131e78563fa59e3e0e7c70c195:/remote-option.diff diff --git a/remote-option.diff b/remote-option.diff index 35efdbf..80c9575 100644 --- a/remote-option.diff +++ b/remote-option.diff @@ -68,19 +68,7 @@ diff --git a/options.c b/options.c case OPT_WRITE_BATCH: /* batch_name is already set */ write_batch = 1; -@@ -1840,6 +1866,11 @@ void server_options(char **args, int *argc_p) - - argstr[x] = '\0'; - -+ if (x > (int)sizeof argstr) { /* Not possible... */ -+ rprintf(FERROR, "argstr overflow in server_options().\n"); -+ exit_cleanup(RERR_MALLOC); -+ } -+ - args[ac++] = argstr; - - #ifdef ICONV_OPTION -@@ -2061,6 +2092,16 @@ void server_options(char **args, int *argc_p) +@@ -2062,6 +2088,16 @@ void server_options(char **args, int *argc_p) else if (remove_source_files) args[ac++] = "--remove-sent-files";