git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@169 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2004/01/03 19:33:53... | ... |
@@ -1,3 +1,15 @@ |
1 |
+Sat Jan 3 11:30:38 CET 2004 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * libclamav: fixed handling of multipart signatures (broken since Dec 2). |
|
4 |
+ The bug was introduced by _me_ and not by the Thomas Lamy's |
|
5 | ||
6 |
+ <rbellora*tecnoaccion.com.ar>, Jean-Christophe Heger |
|
7 |
+ <jcheger*acytec.com> and Tomasz Papszun <tomek*clamav.net>. |
|
8 |
+ Many thanks ! |
|
9 |
+ |
|
10 |
+ * freshclam: finish with a proper return code (always returned with 0). |
|
11 |
+ Fixed by Martin Kraft <martin.kraft*fal.de>. |
|
12 |
+ |
|
1 | 13 |
Wed Dec 31 14:47:13 GMT 2003 (njh) |
2 | 14 |
---------------------------------- |
3 | 15 |
* clamav-milter: Included the sendmail queue ID in the log, from an |
... | ... |
@@ -27,7 +27,7 @@ |
27 | 27 |
#include "others.h" |
28 | 28 |
#include "shared.h" |
29 | 29 |
|
30 |
-void freshclam(struct optstruct *opt); |
|
30 |
+int freshclam(struct optstruct *opt); |
|
31 | 31 |
|
32 | 32 |
int main(int argc, char **argv) |
33 | 33 |
{ |
... | ... |
@@ -106,11 +106,11 @@ int main(int argc, char **argv) |
106 | 106 |
|
107 | 107 |
} |
108 | 108 |
|
109 |
- freshclam(opt); |
|
109 |
+ ret = freshclam(opt); |
|
110 | 110 |
|
111 | 111 |
free_opt(opt); |
112 | 112 |
|
113 |
- return(0); |
|
113 |
+ return ret; |
|
114 | 114 |
} |
115 | 115 |
|
116 | 116 |
void register_char_option(struct optstruct *opt, char ch) |
... | ... |
@@ -149,8 +149,8 @@ int cl_loaddb(const char *filename, struct cl_node **root, int *virnum) |
149 | 149 |
|
150 | 150 |
if(parts) /* there's always one part more */ |
151 | 151 |
parts++; |
152 |
- for(i = 0; i < parts; i++) { |
|
153 |
- if((pt2 = cli_strtok(pt, i, "*")) == NULL) { |
|
152 |
+ for(i = 1; i <= parts; i++) { |
|
153 |
+ if((pt2 = cli_strtok(pt, i - 1, "*")) == NULL) { |
|
154 | 154 |
cli_errmsg("Can't extract part %d of partial signature in line %d\n", i + 1, line); |
155 | 155 |
return CL_EMALFDB; |
156 | 156 |
} |
... | ... |
@@ -161,7 +161,7 @@ int cl_loaddb(const char *filename, struct cl_node **root, int *virnum) |
161 | 161 |
free(buffer); |
162 | 162 |
return ret; |
163 | 163 |
} |
164 |
- //cli_dbgmsg("Added part %d of partial signature (id %d)\n", i, sigid); |
|
164 |
+// cli_dbgmsg("Added part %d of partial signature (id %d)\n", i, sigid); |
|
165 | 165 |
free(pt2); |
166 | 166 |
} |
167 | 167 |
|