[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:13:32 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 145a188666c598b876d96ca2c34a4887e8222013
Author: aCaB <acab at clamav.net>
Date:   Mon Jan 4 17:05:37 2010 +0100

    hs api upgrade

diff --git a/libclamav/matcher-ac.c b/libclamav/matcher-ac.c
index 896b042..9423c63 100644
--- a/libclamav/matcher-ac.c
+++ b/libclamav/matcher-ac.c
@@ -872,10 +872,7 @@ int cli_ac_initdata(struct cli_ac_data *data, uint32_t partsigs, uint32_t lsigs,
 	return CL_ENULLARG;
     }
 
-    if(cli_hashset_init(&data->vinfo, 32, 80)) {
-	cli_errmsg("cli_ac_init: Can't allocate vinfo hashtab\n");
-	return CL_EMEM;
-    }
+    cli_hashset_init_noalloc(&data->vinfo);
 
     data->reloffsigs = reloffsigs;
     if(reloffsigs) {
@@ -1081,7 +1078,7 @@ int cli_ac_scanbuff(const unsigned char *buffer, uint32_t length, const char **v
 			realoff = offset + bp - pt->prefix_length;
 			if(patt->offdata[0] == CLI_OFF_VERSION) {
 			    cli_errmsg("CHECK: %x\n", realoff);
-			    if(!cli_hashset_contains(&mdata->vinfo, realoff)) {
+			    if(!cli_hashset_contains_maybe_noalloc(&mdata->vinfo, realoff)) {
 				pt = pt->next_same;
 				continue;
 			    }
diff --git a/libclamav/pe.c b/libclamav/pe.c
index e24ed85..2b8442f 100644
--- a/libclamav/pe.c
+++ b/libclamav/pe.c
@@ -2405,7 +2405,14 @@ int cli_peheader(fmap_t *map, struct cli_exe_info *peinfo)
 	return -1;
     }
 
-    
+    if(cli_hashset_init(&peinfo->vinfo, 32, 80)) {
+	cli_errmsg("Unable to init vinfo hs\n");
+	free(section_hdr);
+	free(peinfo->section);
+	peinfo->section = NULL;
+	return -1;
+    }
+
     if(dirs[2].Size) {
     	uint32_t rvas, res_sz;
 	uint8_t *vptr, *baseptr;

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list