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

aCaB acab at clamav.net
Sun Apr 4 01:03:31 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 49ee0318fc10a83a059793ef3b1929dc93f1d578
Author: aCaB <acab at clamav.net>
Date:   Tue Sep 1 19:15:57 2009 +0200

    fix scanbuff callers

diff --git a/libclamav/matcher-ac.c b/libclamav/matcher-ac.c
index 3f61743..9918dc7 100644
--- a/libclamav/matcher-ac.c
+++ b/libclamav/matcher-ac.c
@@ -836,7 +836,6 @@ int cli_ac_caloff(const struct cli_matcher *root, struct cli_ac_data *data, stru
 	unsigned int i;
 	struct cli_ac_patt *patt;
 	struct cli_target_info info;
-	struct stat sb;
 
     if(map) {
 	memset(&info, 0, sizeof(info));
@@ -1487,7 +1486,7 @@ int cli_ac_addsig(struct cli_matcher *root, const char *virname, const char *hex
     if(new->lsigid[0])
 	root->ac_lsigtable[new->lsigid[1]]->virname = new->virname;
 
-    ret = cli_caloff(offset, NULL, -1, root->type, new->offdata, &new->offset_min, &new->offset_max);
+    ret = cli_caloff(offset, NULL, NULL, root->type, new->offdata, &new->offset_min, &new->offset_max);
     if(ret != CL_SUCCESS) {
 	mpool_free(root->mempool, new->prefix ? new->prefix : new->pattern);
 	mpool_ac_free_alt(root->mempool, new);
diff --git a/libclamav/matcher.c b/libclamav/matcher.c
index 4ac571b..05c6fa9 100644
--- a/libclamav/matcher.c
+++ b/libclamav/matcher.c
@@ -111,9 +111,6 @@ int cli_caloff(const char *offstr, struct cli_target_info *info, struct F_MAP *m
 	char offcpy[65];
 	unsigned int n, val;
 	char *pt;
-	off_t pos;
-	struct stat sb;
-
 
     if(!info) { /* decode offset string */
 	if(!offstr) {
diff --git a/libclamav/pe.c b/libclamav/pe.c
index 03848b3..e265ea4 100644
--- a/libclamav/pe.c
+++ b/libclamav/pe.c
@@ -904,8 +904,8 @@ int cli_scanpe(cli_ctx *ctx)
 		for(j = 0; j < md5_sect->soff_len && md5_sect->soff[j] <= exe_sections[i].rsz; j++) {
 		    if(md5_sect->soff[j] == exe_sections[i].rsz) {
 			unsigned char md5_dig[16];
-			if(cli_md5sect(map, &exe_sections[i], md5_dig) && cli_bm_scanbuff(md5_dig, 16, ctx->virname, ctx->engine->md5_mdb, 0, -1) == CL_VIRUS) {
-			    if(cli_bm_scanbuff(md5_dig, 16, NULL, ctx->engine->md5_fp, 0, -1) != CL_VIRUS) {
+			if(cli_md5sect(map, &exe_sections[i], md5_dig) && cli_bm_scanbuff(md5_dig, 16, ctx->virname, ctx->engine->md5_mdb, 0, NULL) == CL_VIRUS) {
+			    if(cli_bm_scanbuff(md5_dig, 16, NULL, ctx->engine->md5_fp, 0, NULL) != CL_VIRUS) {
 
 				free(section_hdr);
 				free(exe_sections);
@@ -2164,7 +2164,6 @@ int cli_peheader(struct F_MAP *map, struct cli_exe_info *peinfo)
 	    struct pe_image_optional_hdr32 opt32;
 	} pe_opt;
 	struct pe_image_section_hdr *section_hdr;
-	struct stat sb;
 	int i;
 	unsigned int err, pe_plus = 0;
 	uint32_t valign, falign, hdr_size;
diff --git a/libclamav/phishcheck.c b/libclamav/phishcheck.c
index 8b5f241..f456b1d 100644
--- a/libclamav/phishcheck.c
+++ b/libclamav/phishcheck.c
@@ -1198,13 +1198,13 @@ static int hash_match(const struct regex_matcher *rlist, const char *host, size_
 	    h[64]='\0';
 	    cli_dbgmsg("Looking up hash %s for %s(%u)%s(%u)\n", h, host, (unsigned)hlen, path, (unsigned)plen);
 	    if (prefix_matched) {
-		if (cli_bm_scanbuff(sha256_dig, 4, &virname, &rlist->hostkey_prefix,0,-1) == CL_VIRUS) {
+		if (cli_bm_scanbuff(sha256_dig, 4, &virname, &rlist->hostkey_prefix,0,NULL) == CL_VIRUS) {
 		    cli_dbgmsg("prefix matched\n");
 		    *prefix_matched = 1;
 		} else
 		    return CL_SUCCESS;
 	    }
-	    if (cli_bm_scanbuff(sha256_dig, 32, &virname, &rlist->sha256_hashes,0,-1) == CL_VIRUS) {
+	    if (cli_bm_scanbuff(sha256_dig, 32, &virname, &rlist->sha256_hashes,0,NULL) == CL_VIRUS) {
 		cli_dbgmsg("This hash matched: %s\n", h);
 		switch(*virname) {
 		    case 'W':
diff --git a/libclamav/regex_list.c b/libclamav/regex_list.c
index 11d6ed0..5ae5a02 100644
--- a/libclamav/regex_list.c
+++ b/libclamav/regex_list.c
@@ -455,7 +455,7 @@ static int add_hash(struct regex_matcher *matcher, char* pattern, const char fl,
 
 	if (fl != 'W' && pat->length == 32 &&
 	    cli_hashset_contains(&matcher->sha256_pfx_set, cli_readint32(pat->pattern)) &&
-	    cli_bm_scanbuff(pat->pattern, 32, &vname, &matcher->sha256_hashes,0,-1) == CL_VIRUS) {
+	    cli_bm_scanbuff(pat->pattern, 32, &vname, &matcher->sha256_hashes,0,NULL) == CL_VIRUS) {
 	    if (*vname == 'W') {
 		/* hash is whitelisted in local.gdb */
 		cli_dbgmsg("Skipping hash %s\n", pattern);

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list