git-svn: trunk@3275
Török Edvin authored on 2007/10/06 17:47:46... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Sat Oct 6 10:47:26 EEST 2007 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * libclamav/phish*.[ch], regex_list.c, rtf.c: fix some warnings |
|
4 |
+ |
|
1 | 5 |
Sat Oct 6 01:10:40 CEST 2007 (tk) |
2 | 6 |
---------------------------------- |
3 | 7 |
* clamd/server-th.c: shutdown conn->sd when exiting scanner_thread() (bb#674) |
... | ... |
@@ -44,7 +44,7 @@ |
44 | 44 |
#include "phish_domaincheck_db.h" |
45 | 45 |
#include "regex_list.h" |
46 | 46 |
|
47 |
-int domainlist_match(const struct cl_engine* engine,const char* real_url,const char* display_url,const struct pre_fixup_info* pre_fixup,int hostOnly,unsigned short* flags) |
|
47 |
+int domainlist_match(const struct cl_engine* engine,char* real_url,const char* display_url,const struct pre_fixup_info* pre_fixup,int hostOnly,unsigned short* flags) |
|
48 | 48 |
{ |
49 | 49 |
const char* info; |
50 | 50 |
int rc = engine->domainlist_matcher ? regex_list_match(engine->domainlist_matcher,real_url,display_url,hostOnly ? pre_fixup : NULL,hostOnly,&info,0) : 0; |
... | ... |
@@ -28,7 +28,7 @@ int init_domainlist(struct cl_engine* engine); |
28 | 28 |
void domainlist_done(struct cl_engine* engine); |
29 | 29 |
void domainlist_cleanup(const struct cl_engine* engine); |
30 | 30 |
int is_domainlist_ok(const struct cl_engine* engine); |
31 |
-int domainlist_match(const struct cl_engine* engine,const char* real_url,const char* display_url,const struct pre_fixup_info* pre_fixup, int hostOnly,unsigned short* flags); |
|
31 |
+int domainlist_match(const struct cl_engine* engine,char* real_url,const char* display_url,const struct pre_fixup_info* pre_fixup, int hostOnly,unsigned short* flags); |
|
32 | 32 |
|
33 | 33 |
#endif |
34 | 34 |
|
... | ... |
@@ -44,7 +44,7 @@ |
44 | 44 |
#include "phish_whitelist.h" |
45 | 45 |
#include "regex_list.h" |
46 | 46 |
|
47 |
-int whitelist_match(const struct cl_engine* engine,const char* real_url,const char* display_url,int hostOnly) |
|
47 |
+int whitelist_match(const struct cl_engine* engine,char* real_url,const char* display_url,int hostOnly) |
|
48 | 48 |
{ |
49 | 49 |
const char* info;/*unused*/ |
50 | 50 |
cli_dbgmsg("Phishing: looking up in whitelist: %s:%s; host-only:%d\n",real_url,display_url,hostOnly); |
... | ... |
@@ -29,7 +29,7 @@ int init_whitelist(struct cl_engine* engine); |
29 | 29 |
void whitelist_done(struct cl_engine* engine); |
30 | 30 |
void whitelist_cleanup(const struct cl_engine* engine); |
31 | 31 |
int is_whitelist_ok(const struct cl_engine* engine); |
32 |
-int whitelist_match(const struct cl_engine* engine, const char* real_url,const char* display_url,int hostOnly); |
|
32 |
+int whitelist_match(const struct cl_engine* engine, char* real_url,const char* display_url,int hostOnly); |
|
33 | 33 |
|
34 | 34 |
#endif |
35 | 35 |
|
... | ... |
@@ -36,7 +36,7 @@ |
36 | 36 |
|
37 | 37 |
/* TODO: when implementation of new version is complete, enable it in CL_EXPERIMENTAL */ |
38 | 38 |
#ifdef CL_EXPERIMENTAL |
39 |
-//#define USE_NEW_VERSION |
|
39 |
+/*#define USE_NEW_VERSION*/ |
|
40 | 40 |
#endif |
41 | 41 |
|
42 | 42 |
#ifndef USE_NEW_VERSION |
... | ... |
@@ -228,7 +228,7 @@ static inline size_t get_char_at_pos_with_skip(const struct pre_fixup_info* info |
228 | 228 |
return (pos <= strlen(buffer)) ? buffer[pos>0 ? pos-1:0] : '\0'; |
229 | 229 |
} |
230 | 230 |
str = info->pre_displayLink.data; |
231 |
- cli_dbgmsg("calc_pos_with_skip: skip:%u, %u - %u \"%s\",\"%s\"\n", pos, info->host_start, info->host_end, str, buffer); |
|
231 |
+ cli_dbgmsg("calc_pos_with_skip: skip:%lu, %lu - %lu \"%s\",\"%s\"\n", pos, info->host_start, info->host_end, str, buffer); |
|
232 | 232 |
pos += info->host_start; |
233 | 233 |
while(str[realpos] && !isalnum(str[realpos])) realpos++; |
234 | 234 |
for(; str[realpos] && (pos>0); pos--) { |
... | ... |
@@ -392,7 +392,7 @@ static int rtf_object_process(struct rtf_state* state, const unsigned char* inpu |
392 | 392 |
if(data->bread == 4) { |
393 | 393 |
out_data += i; |
394 | 394 |
data->bread=0; |
395 |
- cli_dbgmsg("Dumping rtf embedded object of size:%ld\n",data->desc_len); |
|
395 |
+ cli_dbgmsg("Dumping rtf embedded object of size:%lu\n",data->desc_len); |
|
396 | 396 |
if((ret = cli_gentempfd(data->tmpdir, &data->name, &data->fd))) |
397 | 397 |
return ret; |
398 | 398 |
data->internal_state = DUMP_DATA; |