[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
Tomasz Kojm
tkojm at clamav.net
Sun Apr 4 01:15:14 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 2ecbd98a5e86bab19b6d8d918ee2fa08f13818fc
Author: Tomasz Kojm <tkojm at clamav.net>
Date: Fri Jan 15 16:24:16 2010 +0100
cdb: handle mail files
diff --git a/libclamav/blob.c b/libclamav/blob.c
index f988e30..6dee23c 100644
--- a/libclamav/blob.c
+++ b/libclamav/blob.c
@@ -29,6 +29,8 @@ static char const rcsid[] = "$Id: blob.c,v 1.64 2007/02/12 22:25:14 njh Exp $";
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> /* for NAME_MAX */
@@ -619,6 +621,7 @@ fileblobScan(const fileblob *fb)
{
int rc;
cli_file_t ftype;
+ struct stat sb;
if(fb->isInfected)
return CL_VIRUS;
@@ -635,6 +638,9 @@ fileblobScan(const fileblob *fb)
fflush(fb->fp);
lseek(fb->fd, 0, SEEK_SET);
+ fstat(fb->fd, &sb);
+ if(cli_matchmeta(fb->ctx, fb->b.name, sb.st_size, sb.st_size, 0, 0, 0, NULL) == CL_VIRUS)
+ return CL_VIRUS;
rc = cli_magic_scandesc(fb->fd, fb->ctx);
if(rc == CL_VIRUS) {
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list