diff -Naur frox-0.7.14/src/control.c frox-0.7.14-pa/src/control.c
--- frox-0.7.14/src/control.c	2009-07-08 12:39:29.000000000 +0200
+++ frox-0.7.14-pa/src/control.c	2009-07-08 13:35:31.000000000 +0200
@@ -255,22 +255,31 @@
 	 * active and a maximal filesize has been set.  Immediately abort, if
 	 * the server already tells us that the file will be too big.
 	 * Otherwise reserve appropriate space from the space daemon */
-	if (strcmp(sstr_buf(cmd),"RETR") == 0
-	  && config.vscanner && config.maxfilesize > 0) {
+	if (strcmp(sstr_buf(cmd),"RETR") == 0) {
 		send_ccommand("SIZE", sstr_buf(arg));
 		get_message(&code, &msg);
 		if (code / 100 == 2) {
 			info->filesize = sstr_atoi(msg);
-			if(info->filesize > config.maxfilesize
-			  && !config.passbigfile) {
+		} else {
+			info->filesize = 0;
+		}
+
+		if (info->filesize > 2147483646) {
+			write_log(VERBOSE, "File %s is too big (>= %d)",
+			  sstr_buf(arg), info->filesize);
+			send_cmessage(451, "File is too large. Aborting");
+			return;
+		}
+
+		if (config.vscanner && (config.maxfilesize > 0)) {
+			if ((info->filesize > config.maxfilesize) && !config.passbigfile) {
 				write_log(VERBOSE, "File %s is too big (%d >= %d)",
 				  sstr_buf(arg), info->filesize, config.maxfilesize);
 				send_cmessage(451, "File is too large. Aborting");
 				return;
 			}
-		} else {
-			info->filesize = 0;
 		}
+
 		/* Allocate space from SpaceDaemon */
 		if(! (info->spacedaemon = pasd_request(pasd_client_type_ftp,
 		  config.userealsize ? info->filesize : config.maxfilesize))) {

