[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:25:14 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 0dd40a5490c631a28ad37b9e03137ebe879c8e7c
Author: Török Edvin <edwin at clamav.net>
Date:   Wed Mar 24 10:16:41 2010 +0200

    Fix OP_BC_COPY.

diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c
index e7b3a7f..29834bd 100644
--- a/libclamav/bytecode.c
+++ b/libclamav/bytecode.c
@@ -1155,6 +1155,8 @@ static int parseBB(struct cli_bc *bc, unsigned func, unsigned bb, unsigned char
 			break;
 		}
 	}
+	if (inst.opcode == OP_BC_COPY)
+	    inst.type = bcfunc->types[inst.u.binop[0]];
 	if (!ok) {
 	    cli_errmsg("Invalid instructions or operands\n");
 	    return CL_EMALFDB;
diff --git a/libclamav/bytecode_vm.c b/libclamav/bytecode_vm.c
index d5226e3..8590250 100644
--- a/libclamav/bytecode_vm.c
+++ b/libclamav/bytecode_vm.c
@@ -961,8 +961,10 @@ int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const struct
 	    DEFINE_OP(OP_BC_GEPZ) {
 		int64_t ptr;
 		if (!(inst->interp_op%5)) {
+		    int32_t off;
+		    READ32(off, inst->u.three[2]);
 		    WRITE64(inst->dest, ptr_compose(stackid,
-						    inst->u.three[1]));
+						    inst->u.three[1]+off));
 		} else {
 		    READ64(ptr, inst->u.three[1]);
 		    WRITE64(inst->dest, ptr);

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list