diff options
author | Wayne Davison <wayned@samba.org> | 2011-12-24 12:18:40 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2011-12-24 12:35:37 -0800 |
commit | d74512eb054666198203cdaaaca29a18ba958725 (patch) | |
tree | 0131f9afdd2e9b1a144edbaa79c10e6bb7068731 /options.c | |
parent | 1a2704512a6f6c9bf267042ff8beb50a24e1d057 (diff) | |
download | rsync-d74512eb054666198203cdaaaca29a18ba958725.tar.gz rsync-d74512eb054666198203cdaaaca29a18ba958725.tar.bz2 rsync-d74512eb054666198203cdaaaca29a18ba958725.zip |
Complain if the --block-size=N value is too large.
Fixes bug 8036.
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1890,6 +1890,12 @@ int parse_arguments(int *argc_p, const char ***argv_p) } #endif + if (block_size > MAX_BLOCK_SIZE) { + snprintf(err_buf, sizeof err_buf, + "--block-size=%lu is too large (max: %u)\n", block_size, MAX_BLOCK_SIZE); + return 0; + } + if (write_batch && read_batch) { snprintf(err_buf, sizeof err_buf, "--write-batch and --read-batch can not be used together\n"); |