From: Wilfried Goesgens Date: Sat, 9 Jun 2012 12:56:41 +0000 (+0200) Subject: WRIT: catch silly send size values. X-Git-Tag: v8.12~28 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=fe0848e37f43c8857e90ad4235f34d06af5451ae WRIT: catch silly send size values. --- diff --git a/citadel/file_ops.c b/citadel/file_ops.c index d1b529d57..ba4c2c3a9 100644 --- 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;