git.samba.org
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a27045
)
Complain if the --block-size=N value is too large.
author
Wayne Davison
<wayned@samba.org>
Sat, 24 Dec 2011 20:18:40 +0000
(12:18 -0800)
committer
Wayne Davison
<wayned@samba.org>
Sat, 24 Dec 2011 20:35:37 +0000
(12:35 -0800)
Fixes bug 8036.
options.c
patch
|
blob
|
history
diff --git
a/options.c
b/options.c
index 9e95c86ac049ad5f33a6e365764371b75f45a433..2e1c1880f49c1aa2674bffc82a03bc9cc3f5697b 100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-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");