fix make distcheck.

0.96
Török Edvin 16 years ago
parent 09bd983946
commit 800a79e091
  1. 3
      libclamav/Makefile.am
  2. 4
      libclamav/Makefile.in
  3. 19
      libclamav/bytecode.c
  4. 5
      libclamav/bytecode_vm.c

@ -323,7 +323,8 @@ libclamav_la_SOURCES = \
macho.c \
macho.h \
ishield.c \
ishield.h
ishield.h \
type_desc.h
if !LINK_TOMMATH
libclamav_la_SOURCES += bignum.c \

@ -131,7 +131,7 @@ am__libclamav_la_SOURCES_DIST = clamav.h matcher-ac.c matcher-ac.h \
uniq.h version.c version.h mpool.c mpool.h default.h sha256.c \
sha256.h bignum.h bytecode.c bytecode.h bytecode_vm.c \
bytecode_priv.h clambc.h cpio.c cpio.h macho.c macho.h \
ishield.c ishield.h bignum.c bignum_class.h
ishield.c ishield.h type_desc.h bignum.c bignum_class.h
@LINK_TOMMATH_FALSE@am__objects_1 = libclamav_la-bignum.lo
am_libclamav_la_OBJECTS = libclamav_la-matcher-ac.lo \
libclamav_la-matcher-bm.lo libclamav_la-matcher.lo \
@ -547,7 +547,7 @@ libclamav_la_SOURCES = clamav.h matcher-ac.c matcher-ac.h matcher-bm.c \
uniq.h version.c version.h mpool.c mpool.h default.h sha256.c \
sha256.h bignum.h bytecode.c bytecode.h bytecode_vm.c \
bytecode_priv.h clambc.h cpio.c cpio.h macho.c macho.h \
ishield.c ishield.h $(am__append_7)
ishield.c ishield.h type_desc.h $(am__append_7)
noinst_LTLIBRARIES = libclamav_internal_utils.la libclamav_internal_utils_nothreads.la
COMMON_CLEANFILES = version.h version.h.tmp *.gcda *.gcno
@MAINTAINER_MODE_TRUE@BUILT_SOURCES = jsparse/generated/operators.h jsparse/generated/keywords.h jsparse-keywords.gperf

@ -121,7 +121,6 @@ static inline int type_isint(uint16_t type)
int cli_bytecode_context_setparam_int(struct cli_bc_ctx *ctx, unsigned i, uint64_t c)
{
unsigned j, s=0;
if (i >= ctx->numParams) {
cli_errmsg("bytecode: param index out of bounds: %u\n", i);
return CL_EARG;
@ -399,11 +398,11 @@ static uint16_t readTypeID(struct cli_bc *bc, unsigned char *buffer,
{
uint64_t t = readNumber(buffer, offset, len, ok);
if (!ok)
return ~0u;
return ~0;
if (t >= bc->num_types + bc->start_tid) {
cli_errmsg("Invalid type id: %u\n", t);
cli_errmsg("Invalid type id: %llu\n", (unsigned long long)t);
*ok = 0;
return ~0u;
return ~0;
}
return t;
}
@ -445,7 +444,9 @@ static void add_static_types(struct cli_bc *bc)
static int parseTypes(struct cli_bc *bc, unsigned char *buffer)
{
unsigned i, j, offset = 1, ok=1, len = strlen(buffer);
unsigned i, offset = 1, len = strlen(buffer);
char ok=1;
if (buffer[0] != 'T') {
cli_errmsg("Invalid function types header: %c\n", buffer[0]);
return CL_EMALFDB;
@ -460,7 +461,6 @@ static int parseTypes(struct cli_bc *bc, unsigned char *buffer)
for (i=(BC_START_TID - 64);i<bc->num_types;i++) {
struct cli_bc_type *ty = &bc->types[i];
uint8_t t = readFixedNumber(buffer, &offset, len, &ok, 1);
uint16_t tid;
if (!ok) {
cli_errmsg("Error reading type kind\n");
return CL_EMALFDB;
@ -607,13 +607,13 @@ static bbid_t readBBID(struct cli_bc_func *func, const unsigned char *buffer, un
return id;
}
/*
static uint16_t get_type(struct cli_bc_func *func, operand_t op)
{
if (op >= func->numValues)
return 64;
return func->types[op];
}
}*/
static int parseBB(struct cli_bc *bc, unsigned func, unsigned bb, unsigned char *buffer)
{
@ -638,7 +638,7 @@ static int parseBB(struct cli_bc *bc, unsigned func, unsigned bb, unsigned char
BB->numInsts = 0;
BB->insts = &bcfunc->allinsts[bcfunc->insn_idx];
while (!last) {
unsigned numOp, i;
unsigned numOp;
if (buffer[offset] == 'T') {
last = 1;
offset++;
@ -875,7 +875,6 @@ int cli_bytecode_run(const struct cli_bc *bc, struct cli_bc_ctx *ctx)
{
struct cli_bc_inst inst;
struct cli_bc_func func;
unsigned i;
if (!ctx || !ctx->bc || !ctx->func)
return CL_ENULLARG;
if (ctx->numParams && (!ctx->values || !ctx->operands))

@ -52,7 +52,7 @@ static int bcfail(const char *msg, long a, long b,
#else
#define TRACE_R(x)
#define TRACE_W(x, w, p)
#define TRACE_EXEC(id, dest, ty, stack, c)
#define TRACE_EXEC(id, dest, ty, stack)
#define CHECK_UNREACHABLE return CL_EBYTECODE
#define CHECK_FUNCID(x);
#define CHECK_EQ(a,b)
@ -189,9 +189,7 @@ static always_inline struct stack_entry *allocate_stack(struct stack *stack,
struct cli_bc_bb *bb,
unsigned bb_inst)
{
unsigned i;
char *values;
const unsigned numValues = func->numValues + func->numConstants;
struct stack_entry *entry = cli_stack_alloc(stack, sizeof(*entry) + sizeof(*values)*func->numBytes);
if (!entry)
return NULL;
@ -424,7 +422,6 @@ static always_inline int check_sdivops(int64_t op0, int64_t op1)
int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const struct cli_bc_func *func, const struct cli_bc_inst *inst)
{
uint64_t tmp;
unsigned i, j, stack_depth=0, bb_inst=0, stop=0, pc=0;
struct cli_bc_func *func2;
struct stack stack;

Loading…
Cancel
Save