Package: clamav-daemon
Version: 0.80-7
Followup-For: Bug #290248
The following is a patch for this bug.
Possibly there are more elegant solutions, but this works.
Yours,
Antonio Fiol
--- clamav-0.80/clamd/scanner.c 2004-10-03 16:58:31.000000000 +0200
+++ clamav-0.80-new/clamd/scanner.c 2005-01-13 11:45:39.000000000 +0100
@@ -234,7 +234,7 @@
int scanstream(int odesc, unsigned long int *scanned, const struct cl_node
*root, const struct cl_limits *limits, int options, const struct cfgstruct
*copt)
{
- int ret, portscan = CL_DEFAULT_MAXPORTSCAN, sockfd, port, acceptd;
+ int ret = 0, portscan = CL_DEFAULT_MAXPORTSCAN, sockfd, port,
acceptd;
int tmpd, bread, retval, timeout, btread;
long int size = 0, maxsize = 0;
short bound = 0;
@@ -357,7 +357,9 @@
if(!btread) {
logg("^ScanStream: Size limit reached ( max: %d)\n",
maxsize);
- break; /* Scan what we have */
+ ret = CL_VIRUS;
+ virname = "ERROR.SizeLimitReached";
+ break;
}
}
}
@@ -371,8 +373,10 @@
logg("!ScanStream: read poll failed.\n");
}
- lseek(tmpd, 0, SEEK_SET);
- ret = cl_scandesc(tmpd, &virname, scanned, root, limits, options);
+ if(ret != CL_VIRUS) {
+ lseek(tmpd, 0, SEEK_SET);
+ ret = cl_scandesc(tmpd, &virname, scanned, root, limits, options);
+ }
if(tmp)
fclose(tmp);
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages clamav-daemon depends on:
ii clamav 0.80-7 Antivirus scanner for Unix
ii clamav-freshclam [clamav-da 0.80-7 Downloads clamav virus databases f
ii debconf [debconf-2.0] 1.4.41 Debian configuration management sy
ii libbz2-1.0 1.0.2-3 high-quality block-sorting file co
ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an
ii libclamav1 0.80-7 Virus scanner library
ii libcurl3 7.12.3-2 Multi-protocol file transfer libra
ii libgmp3 4.1.4-5 Multiprecision arithmetic library
ii libidn11 0.5.2-3 GNU libidn library, implementation
ii libssl0.9.7 0.9.7e-3 SSL shared libraries
ii logrotate 3.7-2 Log rotation utility
ii ucf 1.13 Update Configuration File: preserv
ii zlib1g 1:1.2.2-4 compression library - runtime
-- debconf information excluded
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]