Or maybe this is cleaner (and more powerful, as it finds virus if they
are present on the received part).
--- clamav-0.80/clamd/scanner.c 2004-10-03 16:58:31.000000000 +0200
+++ clamav-0.80-new/clamd/scanner.c 2005-01-13 12:24:19.000000000 +0100
@@ -244,6 +244,7 @@
struct hostent *he;
struct cfgstruct *cpt;
FILE *tmp = NULL;
+ int oversized = 0;
while(!bound && portscan--) {
@@ -357,6 +358,7 @@
if(!btread) {
logg("^ScanStream: Size limit reached ( max: %d)\n",
maxsize);
+ oversized = 1;
break; /* Scan what we have */
}
}
@@ -383,6 +385,9 @@
mdprintf(odesc, "stream: %s FOUND\n", virname);
logg("stream: %s FOUND\n", virname);
virusaction(virname, copt);
+ } else if(oversized) {
+ mdprintf(odesc, "stream: SizeLimitExceeded ERROR\n");
+ logg("stream: SizeLimitExceeded ERROR\n");
} else if(ret != CL_CLEAN) {
mdprintf(odesc, "stream: %s ERROR\n", cl_strerror(ret));
logg("stream: %s ERROR\n", cl_strerror(ret));
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]