diff --git a/ChangeLog b/ChangeLog index f98f89a52..d2b18b6ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Aug 11 13:39:11 EEST 2010 (edwin) +------------------------------------- + * freshclam: uses private symbol which changed proto, change name to prevent crash (bb #2187) + Wed Aug 11 12:32:37 CEST 2010 (acab) ------------------------------------ * libclamav: fix callback_sigload diff --git a/clambc/bcrun.c b/clambc/bcrun.c index 47a6004f4..c9b9735af 100644 --- a/clambc/bcrun.c +++ b/clambc/bcrun.c @@ -339,7 +339,7 @@ int main(int argc, char *argv[]) optfree(opts); exit(4); } - rc = cli_bytecode_prepare(engine, &bcs, BYTECODE_ENGINE_MASK); + rc = cli_bytecode_prepare2(engine, &bcs, BYTECODE_ENGINE_MASK); if (rc != CL_SUCCESS) { fprintf(stderr,"Unable to prepare bytecode: %s\n", cl_strerror(rc)); optfree(opts); diff --git a/freshclam/manager.c b/freshclam/manager.c index 39d05a651..7a1024326 100644 --- a/freshclam/manager.c +++ b/freshclam/manager.c @@ -1768,7 +1768,7 @@ static int updatedb(const char *dbname, const char *hostname, char *ip, int *sig cl_engine_free(engine); return 55; } - if(optget(opts, "Bytecode")->enabled && (ret = cli_bytecode_prepare(engine, &engine->bcs, engine->dconf->bytecode/*FIXME: dconf has no sense here*/))) { + if(optget(opts, "Bytecode")->enabled && (ret = cli_bytecode_prepare2(engine, &engine->bcs, engine->dconf->bytecode/*FIXME: dconf has no sense here*/))) { logg("!Failed to compile/load bytecode: %s\n", cl_strerror(ret)); unlink(newfile); free(newfile); diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c index af0482711..1d31544b9 100644 --- a/libclamav/bytecode.c +++ b/libclamav/bytecode.c @@ -2248,7 +2248,7 @@ static int run_builtin_or_loaded(struct cli_all_bc *bcs, uint8_t kind, const cha return rc; } -int cli_bytecode_prepare(struct cl_engine *engine, struct cli_all_bc *bcs, unsigned dconfmask) +int cli_bytecode_prepare2(struct cl_engine *engine, struct cli_all_bc *bcs, unsigned dconfmask) { unsigned i, interp = 0, jitok = 0, jitcount=0; int rc; diff --git a/libclamav/bytecode.h b/libclamav/bytecode.h index c20ca5e4d..cc307b749 100644 --- a/libclamav/bytecode.h +++ b/libclamav/bytecode.h @@ -108,7 +108,7 @@ extern int have_clamjit; #endif int cli_bytecode_init(struct cli_all_bc *allbc); int cli_bytecode_load(struct cli_bc *bc, FILE *f, struct cli_dbio *dbio, int security); -int cli_bytecode_prepare(struct cl_engine *engine, struct cli_all_bc *allbc, unsigned dconfmask); +int cli_bytecode_prepare2(struct cl_engine *engine, struct cli_all_bc *allbc, unsigned dconfmask); int cli_bytecode_run(const struct cli_all_bc *bcs, const struct cli_bc *bc, struct cli_bc_ctx *ctx); void cli_bytecode_destroy(struct cli_bc *bc); int cli_bytecode_done(struct cli_all_bc *allbc); diff --git a/libclamav/libclamav.map b/libclamav/libclamav.map index 5f9d0bfd2..e0e470bc1 100644 --- a/libclamav/libclamav.map +++ b/libclamav/libclamav.map @@ -157,7 +157,7 @@ CLAMAV_PRIVATE { have_rar; have_clamjit; cli_bytecode_load; - cli_bytecode_prepare; + cli_bytecode_prepare2; cli_bytecode_run; cli_bytecode_destroy; cli_bytecode_context_alloc; diff --git a/libclamav/readdb.c b/libclamav/readdb.c index 2b28b7435..5f90e9797 100644 --- a/libclamav/readdb.c +++ b/libclamav/readdb.c @@ -3107,7 +3107,7 @@ int cl_engine_compile(struct cl_engine *engine) mpool_flush(engine->mempool); /* Compile bytecode */ - if((ret = cli_bytecode_prepare(engine, &engine->bcs, engine->dconf->bytecode))) { + if((ret = cli_bytecode_prepare2(engine, &engine->bcs, engine->dconf->bytecode))) { cli_errmsg("Unable to compile/load bytecode: %s\n", cl_strerror(ret)); return ret; } diff --git a/unit_tests/check_bytecode.c b/unit_tests/check_bytecode.c index d471a53f4..b32ac0ed1 100644 --- a/unit_tests/check_bytecode.c +++ b/unit_tests/check_bytecode.c @@ -87,7 +87,7 @@ static void runtest(const char *file, uint64_t expected, int fail, int nojit, if (testmode) engine->bytecode_mode = CL_BYTECODE_MODE_TEST; - rc = cli_bytecode_prepare(engine, &bcs, BYTECODE_ENGINE_MASK); + rc = cli_bytecode_prepare2(engine, &bcs, BYTECODE_ENGINE_MASK); fail_unless(rc == CL_SUCCESS, "cli_bytecode_prepare failed"); if (have_clamjit && !nojit && nojit != -1) { diff --git a/win32/libclamav.def b/win32/libclamav.def index ac9276769..ccc1771c3 100644 --- a/win32/libclamav.def +++ b/win32/libclamav.def @@ -92,7 +92,7 @@ EXPORTS cli_bytecode_context_setparam_int @44232 NONAME EXPORTS cli_bytecode_context_setfuncid @44233 NONAME EXPORTS cli_bytecode_context_set_trace @44234 NONAME EXPORTS cli_bytecode_context_alloc @44235 NONAME -EXPORTS cli_bytecode_prepare @44236 NONAME +EXPORTS cli_bytecode_prepare2 @44236 NONAME EXPORTS cli_bytecode_load @44237 NONAME EXPORTS cli_bytecode_init @44238 NONAME EXPORTS cli_bytecode_debug @44239 NONAME