projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6234259
)
WRIT: catch silly send size values.
author
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 9 Jun 2012 12:56:41 +0000
(14:56 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 9 Jun 2012 12:56:41 +0000
(14:56 +0200)
citadel/file_ops.c
patch
|
blob
|
history
diff --git
a/citadel/file_ops.c
b/citadel/file_ops.c
index d1b529d57efada1399545722745c3873bdf07e5c..ba4c2c3a9c533817a3843ea38e110ec3dae74656 100644
(file)
--- a/
citadel/file_ops.c
+++ b/
citadel/file_ops.c
@@
-634,6
+634,10
@@
void cmd_writ(char *cmdbuf)
cprintf("%d You don't have an upload file open.\n", ERROR + RESOURCE_NOT_OPEN);
return;
}
+ if (bytes <= 0) {
+ cprintf("%d you have to specify a value > 0.\n", ERROR + ILLEGAL_VALUE);
+ return;
+ }
if (bytes > 100000) {
bytes = 100000;