[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:16:01 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 242bc10b0e1ae99e1cc7e8d1c85aea5974cf8151
Author: Török Edvin <edwin at clamav.net>
Date:   Wed Jan 20 18:20:53 2010 +0200

    longest asm instructioj 4096->32.

diff --git a/libclamav/bytecode_api.c b/libclamav/bytecode_api.c
index 429cd98..175dee0 100644
--- a/libclamav/bytecode_api.c
+++ b/libclamav/bytecode_api.c
@@ -109,8 +109,9 @@ uint32_t cli_bcapi_disasm_x86(struct cli_bc_ctx *ctx, struct DISASM_RESULT *res,
     const char* next;
     if (!res || !ctx->fmap || ctx->off >= ctx->fmap->len)
 	return -1;
-    /* FIXME: 4096 is an overestimate, how long is the longest instruction? */
-    n = MIN(4096, ctx->fmap->len - ctx->off);
+    /* 32 should be longest instr we support decoding.
+     * When we'll support mmx/sse instructions this should be updated! */
+    n = MIN(32, ctx->fmap->len - ctx->off);
     buf = fmap_need_off_once(ctx->fmap, ctx->off, n);
     next = cli_disasm_one(buf, n, res, 0);
     if (!next)

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list