[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:10:28 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 34da9ae405bddb883f554598d104749b5d0ef044
Author: Török Edvin <edwin at clamav.net>
Date:   Fri Dec 4 16:45:48 2009 +0200

    change bytecode format to allow structs with more than 16 fields.

diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c
index 92688b8..a3c7a1b 100644
--- a/libclamav/bytecode.c
+++ b/libclamav/bytecode.c
@@ -497,7 +497,7 @@ static void parseType(struct cli_bc *bc, struct cli_bc_type *ty,
 {
     unsigned j;
 
-    ty->numElements = readFixedNumber(buffer, off, len, ok, 1);
+    ty->numElements = readNumber(buffer, off, len, ok);
     if (!ok) {
 	cli_errmsg("Error parsing type\n");
 	*ok = 0;
diff --git a/libclamav/bytecode_api_decl.c b/libclamav/bytecode_api_decl.c
index 44537c9..4a612a6 100644
--- a/libclamav/bytecode_api_decl.c
+++ b/libclamav/bytecode_api_decl.c
@@ -56,7 +56,7 @@ const struct cli_apiglobal cli_globals[] = {
 /* Bytecode globals END */
 };
 const unsigned cli_apicall_maxglobal = _LAST_GLOBAL-1;
-static uint16_t cli_tmp0[]={79, 77, 75, 72, 70, 32, 32};
+static uint16_t cli_tmp0[]={79, 77, 75, 72, 70, 32, 32, 32, 8, 65};
 static uint16_t cli_tmp1[]={71};
 static uint16_t cli_tmp2[]={32, 32};
 static uint16_t cli_tmp3[]={73};
@@ -83,7 +83,7 @@ static uint16_t cli_tmp23[]={93};
 static uint16_t cli_tmp24[]={92};
 
 const struct cli_bc_type cli_apicall_types[]={
-	{DStructType, cli_tmp0, 7, 0, 0},
+	{DStructType, cli_tmp0, 10, 0, 0},
 	{DPointerType, cli_tmp1, 1, 0, 0},
 	{DStructType, cli_tmp2, 2, 0, 0},
 	{DPointerType, cli_tmp3, 1, 0, 0},
diff --git a/libclamav/pe.c b/libclamav/pe.c
index 9f73d83..565b487 100644
--- a/libclamav/pe.c
+++ b/libclamav/pe.c
@@ -2125,6 +2125,7 @@ int cli_scanpe(cli_ctx *ctx)
     pedata.opt32 = &pe_opt.opt32;
     pedata.opt64 = &pe_opt.opt64;
     pedata.dirs = dirs;
+    pedata.e_lfanew = e_lfanew;
     pedata.overlays = overlays;
     pedata.overlays_sz = fsize - overlays;
     cli_bytecode_context_setpe(bc_ctx, &pedata);
diff --git a/libclamav/pe.h b/libclamav/pe.h
index 8272c41..2eb2aa4 100644
--- a/libclamav/pe.h
+++ b/libclamav/pe.h
@@ -26,6 +26,7 @@
 #include "others.h"
 #include "cltypes.h"
 #include "fmap.h"
+#include "bcfeatures.h"
 /** @file */
 /** Header for this PE file */
 struct pe_image_file_hdr {
@@ -141,8 +142,12 @@ struct cli_pe_hook_data {
     struct pe_image_optional_hdr32 *opt32;
     struct pe_image_optional_hdr64 *opt64;
     struct pe_image_data_dir *dirs;
+    uint32_t e_lfanew;/**< address of new exe header */
     uint32_t overlays;/**< number of overlays */
     int32_t overlays_sz;/**< size of overlays */
+    /* FIXME: these should not be necessary (they are for now) */
+    uint8_t dummyn;
+    uint8_t *dummy EBOUNDS(dummyn);
 };
 
 int cli_scanpe(cli_ctx *ctx);

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list