[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 2d188d1feb130e7c5a733d259a424e9bd013a1a7
Author: aCaB <acab at clamav.net>
Date:   Tue Sep 1 19:43:54 2009 +0200

    pe.c: remove stale code

diff --git a/libclamav/pe.c b/libclamav/pe.c
index e265ea4..a85c4dd 100644
--- a/libclamav/pe.c
+++ b/libclamav/pe.c
@@ -331,10 +331,6 @@ static void cli_parseres_special(uint32_t base, uint32_t rva, struct F_MAP *map,
 	    return;
     rawaddr += named*8; /* skip named */
     /* this is just used in a heuristic detection, so don't give error on failure */
-    if (!entry) {
-	    cli_dbgmsg("cli_parseres_special: failed to allocate memory for resource directory:%lu\n", (unsigned long)entries);
-	    return;
-    }
     if(!(entry = fmap_need_off(map, rawaddr+16, entries*8))) {
 	    cli_dbgmsg("cli_parseres_special: failed to read resource directory at:%lu\n", (unsigned long)rawaddr+16);
 	    return;
@@ -1722,15 +1718,9 @@ int cli_scanpe(cli_ctx *ctx)
 	    return CL_CLEAN;
 	}
 
-	if((src = (char *) cli_malloc(ssize)) == NULL) {
-	    free(exe_sections);
-	    return CL_EMEM;
-	}
-
 	if(!exe_sections[i + 1].raw || !(src = fmap_need_off_once(map, exe_sections[i + 1].raw, ssize))) {
 	    cli_dbgmsg("UPX: Can't read raw data of section %d\n", i+1);
 	    free(exe_sections);
-	    free(dest);
 	    return CL_EREAD;
 	}
 
@@ -1739,7 +1729,6 @@ int cli_scanpe(cli_ctx *ctx)
 	    return CL_EMEM;
 	}
 
-
 	/* try to detect UPX code */
 	if(cli_memstr(UPX_NRV2B, 24, epbuff + 0x69, 13) || cli_memstr(UPX_NRV2B, 24, epbuff + 0x69 + 8, 13)) {
 	    cli_dbgmsg("UPX: Looks like a NRV2B decompression routine\n");

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list