git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1114 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2004/11/20 22:18:59... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Sat Nov 20 13:18:58 GMT 2004 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/untar.c: Better handling of false file type identification |
|
4 |
+ |
|
1 | 5 |
Fri Nov 19 11:34:56 GMT 2004 (njh) |
2 | 6 |
---------------------------------- |
3 | 7 |
* libclamav/mbox.c: Scan email footers (portions after the last MIME |
... | ... |
@@ -21,6 +21,9 @@ |
21 | 21 |
* |
22 | 22 |
* Change History: |
23 | 23 |
* $Log: untar.c,v $ |
24 |
+ * Revision 1.18 2004/11/20 13:15:46 nigelhorne |
|
25 |
+ * Better handling of false file type identification |
|
26 |
+ * |
|
24 | 27 |
* Revision 1.17 2004/10/27 06:36:38 nigelhorne |
25 | 28 |
* Handle type '1' files |
26 | 29 |
* |
... | ... |
@@ -73,7 +76,7 @@ |
73 | 73 |
* First draft |
74 | 74 |
* |
75 | 75 |
*/ |
76 |
-static char const rcsid[] = "$Id: untar.c,v 1.17 2004/10/27 06:36:38 nigelhorne Exp $"; |
|
76 |
+static char const rcsid[] = "$Id: untar.c,v 1.18 2004/11/20 13:15:46 nigelhorne Exp $"; |
|
77 | 77 |
|
78 | 78 |
#include <stdio.h> |
79 | 79 |
#include <errno.h> |
... | ... |
@@ -193,8 +196,19 @@ cli_untar(const char *dir, int desc) |
193 | 193 |
cli_errmsg("cli_untar: only standard TAR files are currently supported\n", type); |
194 | 194 |
return CL_EFORMAT; |
195 | 195 |
default: |
196 |
- cli_errmsg("cli_untar: unknown type flag %c\n", type); |
|
197 |
- return CL_EIO; |
|
196 |
+ /*cli_errmsg("cli_untar: unknown type flag %c\n", type); |
|
197 |
+ return CL_EFORMAT;*/ |
|
198 |
+ /* |
|
199 |
+ * It isn't really a tar file |
|
200 |
+ */ |
|
201 |
+ cli_dbgmsg("cli_untar: unknown type flag %c\n", type); |
|
202 |
+ /* |
|
203 |
+ * We don't know that it's clean at all, |
|
204 |
+ * it would be better to have a |
|
205 |
+ * CL_CONTINUE return value since it |
|
206 |
+ * may be a different format |
|
207 |
+ */ |
|
208 |
+ return CL_CLEAN; |
|
198 | 209 |
} |
199 | 210 |
|
200 | 211 |
if(directory) { |