[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:27:26 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit b9697ed80c423d2b38b5373cff872ee3d4b1f253
Author: Török Edvin <edwin at clamav.net>
Date:   Mon Mar 29 22:33:20 2010 +0300

    Fix OP_BC_GEPZ/OP_BC_GEP1 in interpreter.
    
    It helps if the interpreter actually increments the variable by a non-zero
    amount.

diff --git a/libclamav/bytecode_vm.c b/libclamav/bytecode_vm.c
index 44b7de6..8afec84 100644
--- a/libclamav/bytecode_vm.c
+++ b/libclamav/bytecode_vm.c
@@ -1052,8 +1052,10 @@ int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const struct
 		    WRITE64(inst->dest, ptr_compose(stackid,
 						    inst->u.three[1]+off));
 		} else {
+		    int32_t off;
+		    READ32(off, inst->u.three[2]);
 		    READ64(ptr, inst->u.three[1]);
-		    WRITE64(inst->dest, ptr);
+		    WRITE64(inst->dest, ptr+off);
 		}
 		break;
 	    }
@@ -1151,10 +1153,12 @@ int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const struct
 		    int32_t off;
 		    READ32(off, inst->u.three[2]);
 		    WRITE64(inst->dest, ptr_compose(stackid,
-						    inst->u.three[1]+off));
+						    inst->u.three[1]+off*inst->u.three[0]));
 		} else {
+		    int32_t off;
+		    READ32(off, inst->u.three[2]);
 		    READ64(ptr, inst->u.three[1]);
-		    WRITE64(inst->dest, ptr);
+		    WRITE64(inst->dest, ptr+off*inst->u.three[0]);
 		}
 		break;
 	    }

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list