From fe0848e37f43c8857e90ad4235f34d06af5451ae Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 9 Jun 2012 14:56:41 +0200 Subject: [PATCH] WRIT: catch silly send size values. --- citadel/file_ops.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.30.2