git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1001 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2004/10/15 08:56:30... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Fri Oct 15 01:53:42 CEST 2004 (tk) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/scanners.c: do not return CL_EFORMAT to callers |
|
4 |
+ |
|
1 | 5 |
Thu Oct 14 22:19:20 BST 2004 (njh) |
2 | 6 |
---------------------------------- |
3 | 7 |
* libclamav/mbox.c: Harden the test for RFC2047 encoded headers |
... | ... |
@@ -1138,7 +1138,7 @@ int cli_magic_scandesc(int desc, const char **virname, long int *scanned, const |
1138 | 1138 |
|
1139 | 1139 |
if(!root) { |
1140 | 1140 |
cli_errmsg("CRITICAL: root == NULL\n"); |
1141 |
- return -1; |
|
1141 |
+ return CL_EMALFDB; |
|
1142 | 1142 |
} |
1143 | 1143 |
|
1144 | 1144 |
if(!options) { /* raw mode (stdin, etc.) */ |
... | ... |
@@ -1298,8 +1298,12 @@ int cli_magic_scandesc(int desc, const char **virname, long int *scanned, const |
1298 | 1298 |
} |
1299 | 1299 |
(*arec)--; |
1300 | 1300 |
|
1301 |
- |
|
1302 |
- return ret; |
|
1301 |
+ if(ret == CL_EFORMAT) { |
|
1302 |
+ cli_warnmsg("Descriptor[%d]: %s\n", desc, cl_strerror(CL_EFORMAT)); |
|
1303 |
+ return CL_CLEAN; |
|
1304 |
+ } else { |
|
1305 |
+ return ret; |
|
1306 |
+ } |
|
1303 | 1307 |
} |
1304 | 1308 |
|
1305 | 1309 |
int cl_scandesc(int desc, const char **virname, unsigned long int *scanned, const struct cl_node *root, const struct cl_limits *limits, unsigned int options) |