Browse code

freshclam is using private symbol that changed proto (bb #2187).

Change name to prevent crash with 0.96.1 freshclam and 0.96.2 libclamav.
You'll get a missing symbol error.

Török Edvin authored on 2010/08/11 19:39:49
Showing 9 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Aug 11 13:39:11 EEST 2010 (edwin)
2
+-------------------------------------
3
+ * freshclam: uses private symbol which changed proto, change name to prevent crash (bb #2187)
4
+
1 5
 Wed Aug 11 12:32:37 CEST 2010 (acab)
2 6
 ------------------------------------
3 7
  * libclamav: fix callback_sigload
... ...
@@ -339,7 +339,7 @@ int main(int argc, char *argv[])
339 339
 	    optfree(opts);
340 340
 	    exit(4);
341 341
 	}
342
-	rc = cli_bytecode_prepare(engine, &bcs, BYTECODE_ENGINE_MASK);
342
+	rc = cli_bytecode_prepare2(engine, &bcs, BYTECODE_ENGINE_MASK);
343 343
 	if (rc != CL_SUCCESS) {
344 344
 	    fprintf(stderr,"Unable to prepare bytecode: %s\n", cl_strerror(rc));
345 345
 	    optfree(opts);
... ...
@@ -1768,7 +1768,7 @@ static int updatedb(const char *dbname, const char *hostname, char *ip, int *sig
1768 1768
 	    cl_engine_free(engine);
1769 1769
 	    return 55;
1770 1770
 	}
1771
-	if(optget(opts, "Bytecode")->enabled && (ret = cli_bytecode_prepare(engine, &engine->bcs, engine->dconf->bytecode/*FIXME: dconf has no sense here*/))) {
1771
+	if(optget(opts, "Bytecode")->enabled && (ret = cli_bytecode_prepare2(engine, &engine->bcs, engine->dconf->bytecode/*FIXME: dconf has no sense here*/))) {
1772 1772
 	    logg("!Failed to compile/load bytecode: %s\n", cl_strerror(ret));
1773 1773
 	    unlink(newfile);
1774 1774
 	    free(newfile);
... ...
@@ -2248,7 +2248,7 @@ static int run_builtin_or_loaded(struct cli_all_bc *bcs, uint8_t kind, const cha
2248 2248
     return rc;
2249 2249
 }
2250 2250
 
2251
-int cli_bytecode_prepare(struct cl_engine *engine, struct cli_all_bc *bcs, unsigned dconfmask)
2251
+int cli_bytecode_prepare2(struct cl_engine *engine, struct cli_all_bc *bcs, unsigned dconfmask)
2252 2252
 {
2253 2253
     unsigned i, interp = 0, jitok = 0, jitcount=0;
2254 2254
     int rc;
... ...
@@ -108,7 +108,7 @@ extern int have_clamjit;
108 108
 #endif
109 109
 int cli_bytecode_init(struct cli_all_bc *allbc);
110 110
 int cli_bytecode_load(struct cli_bc *bc, FILE *f, struct cli_dbio *dbio, int security);
111
-int cli_bytecode_prepare(struct cl_engine *engine, struct cli_all_bc *allbc, unsigned dconfmask);
111
+int cli_bytecode_prepare2(struct cl_engine *engine, struct cli_all_bc *allbc, unsigned dconfmask);
112 112
 int cli_bytecode_run(const struct cli_all_bc *bcs, const struct cli_bc *bc, struct cli_bc_ctx *ctx);
113 113
 void cli_bytecode_destroy(struct cli_bc *bc);
114 114
 int cli_bytecode_done(struct cli_all_bc *allbc);
... ...
@@ -157,7 +157,7 @@ CLAMAV_PRIVATE {
157 157
     have_rar;
158 158
     have_clamjit;
159 159
     cli_bytecode_load;
160
-    cli_bytecode_prepare;
160
+    cli_bytecode_prepare2;
161 161
     cli_bytecode_run;
162 162
     cli_bytecode_destroy;
163 163
     cli_bytecode_context_alloc;
... ...
@@ -3107,7 +3107,7 @@ int cl_engine_compile(struct cl_engine *engine)
3107 3107
     mpool_flush(engine->mempool);
3108 3108
 
3109 3109
     /* Compile bytecode */
3110
-    if((ret = cli_bytecode_prepare(engine, &engine->bcs, engine->dconf->bytecode))) {
3110
+    if((ret = cli_bytecode_prepare2(engine, &engine->bcs, engine->dconf->bytecode))) {
3111 3111
 	cli_errmsg("Unable to compile/load bytecode: %s\n", cl_strerror(ret));
3112 3112
 	return ret;
3113 3113
     }
... ...
@@ -87,7 +87,7 @@ static void runtest(const char *file, uint64_t expected, int fail, int nojit,
87 87
     if (testmode)
88 88
 	engine->bytecode_mode = CL_BYTECODE_MODE_TEST;
89 89
 
90
-    rc = cli_bytecode_prepare(engine, &bcs, BYTECODE_ENGINE_MASK);
90
+    rc = cli_bytecode_prepare2(engine, &bcs, BYTECODE_ENGINE_MASK);
91 91
     fail_unless(rc == CL_SUCCESS, "cli_bytecode_prepare failed");
92 92
 
93 93
     if (have_clamjit && !nojit && nojit != -1) {
... ...
@@ -92,7 +92,7 @@ EXPORTS cli_bytecode_context_setparam_int @44232 NONAME
92 92
 EXPORTS cli_bytecode_context_setfuncid @44233 NONAME
93 93
 EXPORTS cli_bytecode_context_set_trace @44234 NONAME
94 94
 EXPORTS cli_bytecode_context_alloc @44235 NONAME
95
-EXPORTS cli_bytecode_prepare @44236 NONAME
95
+EXPORTS cli_bytecode_prepare2 @44236 NONAME
96 96
 EXPORTS cli_bytecode_load @44237 NONAME
97 97
 EXPORTS cli_bytecode_init @44238 NONAME
98 98
 EXPORTS cli_bytecode_debug @44239 NONAME