int keep_partial=0;
int safe_symlinks=0;
int copy_unsafe_links=0;
-int block_size=0;
int size_only=0;
int bwlimit=0;
int delete_after=0;
int ignore_errors=0;
int modify_window=0;
int blocking_io=-1;
+unsigned int block_size = 0;
/** Network address family. **/
int always_checksum = 0;
int list_only = 0;
+#define MAX_BATCH_PREFIX_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_prefix = NULL;
static int modify_window_set;
rprintf(F," --ignore-existing ignore files that already exist on receiving side\n");
rprintf(F," --delete delete files that don't exist on the sending side\n");
rprintf(F," --delete-excluded also delete excluded files on the receiving side\n");
- rprintf(F," --delete-after delete after transferring, not before\n");
+ rprintf(F," --delete-after receiver deletes after transferring, not before\n");
rprintf(F," --ignore-errors delete even if there are IO errors\n");
rprintf(F," --max-delete=NUM don't delete more than NUM files\n");
rprintf(F," --partial keep partially transferred files\n");
"write-batch and read-batch can not be used together\n");
exit_cleanup(RERR_SYNTAX);
}
+ if (batch_prefix && strlen(batch_prefix) > MAX_BATCH_PREFIX_LEN) {
+ rprintf(FERROR,
+ "the batch-file prefix must be %d characters or less.\n",
+ MAX_BATCH_PREFIX_LEN);
+ exit_cleanup(RERR_SYNTAX);
+ }
+
+ if (tmpdir && strlen(tmpdir) >= MAXPATHLEN - 10) {
+ rprintf(FERROR, "the --temp-dir path is WAY too long.\n");
+ exit_cleanup(RERR_SYNTAX);
+ }
if (do_compression && (write_batch || read_batch)) {
rprintf(FERROR,
static char mwindow[30];
static char bw[50];
/* Leave room for ``--(write|read)-batch='' */
- static char fext[MAXPATHLEN + 15];
+ static char fext[MAX_BATCH_PREFIX_LEN + 15];
int i, x;
if (x != 1) args[ac++] = argstr;
if (block_size) {
- snprintf(bsize,sizeof(bsize),"-B%d",block_size);
+ snprintf(bsize, sizeof bsize, "-B%u", block_size);
args[ac++] = bsize;
}