[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:22:27 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 65cc5979e4eea6c001a86c2e7de2b4bc5ef60ad2
Author: Török Edvin <edwin at clamav.net>
Date:   Wed Mar 10 14:49:22 2010 +0200

    Better fix for found_possibly_unwanted and caching.
    
    We treat found_possibly_unwanted as EMAX, except we can't cache
    these at all, not even at their own reclevel, and we certainly can't cache
    level0 (since we know it'll be virus).
    We are still caching siblings in an archive, as long as they don't hit emax
    themselves.

diff --git a/libclamav/cache.c b/libclamav/cache.c
index 4cd6c60..5a8380e 100644
--- a/libclamav/cache.c
+++ b/libclamav/cache.c
@@ -655,6 +655,8 @@ void cache_add(unsigned char *md5, size_t size, cli_ctx *ctx) {
        return;
 
     level =  (*ctx->fmap && (*ctx->fmap)->dont_cache_flag) ? ctx->recursion : 0;
+    if (ctx->found_possibly_unwanted && (level || !ctx->recursion))
+	return;
     c = &ctx->engine->cache[key];
     if(pthread_mutex_lock(&c->mutex)) {
 	cli_errmsg("cli_add: mutex lock fail\n");
diff --git a/libclamav/scanners.c b/libclamav/scanners.c
index 370b610..e5f5c3f 100644
--- a/libclamav/scanners.c
+++ b/libclamav/scanners.c
@@ -2356,6 +2356,7 @@ int cli_found_possibly_unwanted(cli_ctx* ctx)
 	} else {
 		cli_warnmsg("cli_found_possibly_unwanted called, but virname is not set\n");
 	}
+	emax_reached(ctx);
 	return CL_CLEAN;
 }
 

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list