[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:23:51 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit c6c464e5908c83f152649fdaf14cf808ed0246a1
Author: Török Edvin <edwin at clamav.net>
Date: Mon Mar 22 12:53:48 2010 +0200
Fix clambc.
diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c
index 2b9f63c..dedf828 100644
--- a/libclamav/bytecode.c
+++ b/libclamav/bytecode.c
@@ -1483,9 +1483,13 @@ static int cli_bytecode_prepare_interpreter(struct cli_bc *bc)
gmap[j] = bc->numGlobalBytes;
bc->numGlobalBytes += typesize(bc, ty);
}
- bc->globalBytes = cli_calloc(1, bc->numGlobalBytes);
- if (!bc->globalBytes)
- return CL_EMEM;
+ if (bc->numGlobalBytes) {
+ bc->globalBytes = cli_calloc(1, bc->numGlobalBytes);
+ if (!bc->globalBytes)
+ return CL_EMEM;
+ } else
+ bc->globalBytes = NULL;
+
for (j=0;j<bc->num_globals;j++) {
struct cli_bc_type *ty;
if (bc->globaltys[j] < 65)
diff --git a/libclamav/bytecode_vm.c b/libclamav/bytecode_vm.c
index 101a124..0ba8131 100644
--- a/libclamav/bytecode_vm.c
+++ b/libclamav/bytecode_vm.c
@@ -264,7 +264,7 @@ static always_inline struct stack_entry *pop_stack(struct stack *stack,
#define uint_type(n) uint##n##_t
#define READNfrom(maxBytes, from, x, n, p)\
CHECK_GT((maxBytes), (p)+(n/8)-1);\
- CHECK_EQ((p)&(n-1), 0);\
+ CHECK_EQ((p)&(n/8-1), 0);\
x = *(uint_type(n)*)&(from)[(p)];\
TRACE_R(x)
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list