This is a Works For Me(TM) patch for this bug. There look to be plenty of other compiler warnings left over that need to be fixed, but as this is a targetted fix, I left them for now.
--- avscan-1.3.1-openssl.orig/avscan/avscanop.c +++ avscan-1.3.1-openssl/avscan/avscanop.c @@ -218,6 +218,7 @@ ) { gint status2; + unsigned int cl_options = CL_SCAN_STDOPT; gchar *s; struct stat stat_buf; ClamAVData *d = (ClamAVData *)g_malloc0( @@ -297,9 +298,10 @@ return(NULL); } - status2 = cl_loaddbdir( + status2 = cl_load( d->database_path, - &d->database, &d->database_entries + &d->database, &d->database_entries, + cl_options ); } else @@ -314,9 +316,10 @@ return(NULL); } - status2 = cl_loaddb( + status2 = cl_load( d->database_path, - &d->database, &d->database_entries + &d->database, &d->database_entries, + cl_options ); } if((status2 != 0) || (d->database == NULL) || (d->database_entries <= 0)) @@ -564,9 +567,6 @@ status = 59; break; case CL_EZIP: - status = 59; - break; - case CL_EMALFZIP: status = 51; break; case CL_EGZIP: @@ -656,6 +656,7 @@ struct dirent *dent; struct stat stat_buf; DIR *dp; + unsigned int cl_options = CL_SCAN_STDOPT; /* Interrupted? */ if(*stop_count > 0) @@ -738,14 +739,16 @@ #else if(FALSE) #endif - status2 = cl_loaddbdir( + status2 = cl_load( d->database_path, - &d->database, &d->database_entries + &d->database, &d->database_entries, + cl_options ); else - status2 = cl_loaddb( + status2 = cl_load( d->database_path, - &d->database, &d->database_entries + &d->database, &d->database_entries, + cl_options ); if((status2 != 0) || (d->database == NULL) || (d->database_entries <= 0) only in patch2: unchanged: --- avscan-1.3.1-openssl.orig/avscan/windb.c +++ avscan-1.3.1-openssl/avscan/windb.c @@ -222,7 +222,7 @@ static gint WinDBGetPatternStatsFindIterate( win_struct *win, const gchar *name, - struct cl_node *clam_pnode, + struct cl_engine *clam_pnode, guint8 **pattern_rtn, gint *pattern_length_rtn, gulong *last_updated_time_rtn, @@ -246,15 +246,18 @@ if(clam_pnode == NULL) return(1); + if(clam_pnode->root != NULL) { /* Iterate through Extended Boyer-Moore list */ - if(clam_pnode->bm_suffix != NULL) + + struct cli_matcher *root = *clam_pnode->root; + if(root->bm_suffix != NULL) { gint i; struct cli_bm_patt *pattern; - for(i = 0; clam_pnode->bm_suffix[i] != NULL; i++) + for(i = 0; root->bm_suffix[i] != NULL; i++) { - for(pattern = clam_pnode->bm_suffix[i]; + for(pattern = root->bm_suffix[i]; pattern != NULL; pattern = pattern->next ) @@ -290,16 +293,17 @@ } /* Extended Aho-Corasick */ - if(clam_pnode->ac_nodes > 0) + + if(root->ac_nodes > 0) { gint i; struct cli_ac_node *clam_ac_node; /* Iterate through Extended Aho-Corasick list */ - for(i = 0; i < clam_pnode->ac_nodes; i++) + for(i = 0; i < root->ac_nodes; i++) { /* Get this Extended Aho-Corasick node */ - clam_ac_node = clam_pnode->ac_nodetable[i]; + clam_ac_node = root->ac_nodetable[i]; if((clam_ac_node != NULL) ? (clam_ac_node->list != NULL) : FALSE ) @@ -477,6 +481,7 @@ } } } + } #undef PROCESS_FIND @@ -655,20 +660,23 @@ } \ } + if(clam_pnode->root != NULL) { /* Iterate through Extended Boyer-Moore list */ - if((clam_pnode->bm_suffix != NULL) && (win->stop_count == 0)) + + struct cli_matcher *root = *clam_pnode->root; + if((root->bm_suffix != NULL) && (win->stop_count == 0)) { gchar *pattern_label; struct cli_bm_patt *pattern; GtkCTreeNode *node, *pnode2; for(i = 0; clam_pnode->bm_suffix[i] != NULL; i++) + for(i = 0; root->bm_suffix[i] != NULL; i++) { if(win->stop_count > 0) break; /* Get this list of patterns */ - pattern = clam_pnode->bm_suffix[i]; + pattern = root->bm_suffix[i]; INSERT_NODE_FOLDER( "Extended Boyer-Moore", pnode, NULL @@ -723,7 +731,7 @@ } /* Extended Aho-Corasick */ - if((clam_pnode->ac_nodes > 0) && (win->stop_count == 0)) + if((root->ac_nodes > 0) && (win->stop_count == 0)) { GtkCTreeNode *node, *pnode2; @@ -733,13 +741,13 @@ pnode2 = node; /* Iterate through Extended Aho-Corasick list */ - for(i = 0; i < clam_pnode->ac_nodes; i++) + for(i = 0; i < root->ac_nodes; i++) { if(win->stop_count > 0) break; /* Get this Extended Aho-Corasick node */ - clam_ac_node = clam_pnode->ac_nodetable[i]; + clam_ac_node = root->ac_nodetable[i]; if((clam_ac_node != NULL) ? (clam_ac_node->list != NULL) : FALSE ) @@ -1013,6 +1021,7 @@ } } } + } #undef UPDATE_PATTERNS_LOADED_STATUS @@ -1042,6 +1051,7 @@ GtkCTree *ctree; const cfg_item_struct *cfg_list; core_struct *core; + unsigned int cl_options = CL_SCAN_STDOPT; if(win == NULL) return; @@ -1210,9 +1220,10 @@ } } start_time = (gulong)time(NULL); - status = cl_loaddbdir( + status = cl_load( db_location, - &database, &database_entries + &database, &database_entries, + cl_options ); } else @@ -1229,9 +1240,10 @@ g_free(parent); } start_time = (gulong)time(NULL); - status = cl_loaddb( + status = cl_load( db_location, - &database, &database_entries + &database, &database_entries, + cl_options ); } } -- ----------------------------------------------------------------- | ,''`. Stephen Gran | | : :' : [EMAIL PROTECTED] | | `. `' Debian user, admin, and developer | | `- http://www.debian.org | -----------------------------------------------------------------
signature.asc
Description: Digital signature