git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@98 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2003/11/05 16:05:59... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Wed Nov 5 12:34:34 IST 2003 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav: Handle spam that sends broken content-disposition |
|
4 |
+ (Fix by NJH, Bug notified by Laurent Wacrenier <lwa@teaser.fr>) |
|
5 |
+ |
|
1 | 6 |
Wed Nov 5 01:52:03 CET 2003 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* libclamav: zziplib: few files converted to UNIX format (thanks to |
... | ... |
@@ -17,6 +17,9 @@ |
17 | 17 |
* |
18 | 18 |
* Change History: |
19 | 19 |
* $Log: message.c,v $ |
20 |
+ * Revision 1.10 2003/11/05 07:03:51 nigelhorne |
|
21 |
+ * Handle broken content-disposition |
|
22 |
+ * |
|
20 | 23 |
* Revision 1.9 2003/10/01 09:28:23 nigelhorne |
21 | 24 |
* Handle content-type header going over to a new line |
22 | 25 |
* |
... | ... |
@@ -24,7 +27,7 @@ |
24 | 24 |
* uuencodebegin() no longer static |
25 | 25 |
* |
26 | 26 |
*/ |
27 |
-static char const rcsid[] = "$Id: message.c,v 1.9 2003/10/01 09:28:23 nigelhorne Exp $"; |
|
27 |
+static char const rcsid[] = "$Id: message.c,v 1.10 2003/11/05 07:03:51 nigelhorne Exp $"; |
|
28 | 28 |
|
29 | 29 |
#ifndef CL_DEBUG |
30 | 30 |
/*#define NDEBUG /* map CLAMAV debug onto standard */ |
... | ... |
@@ -219,9 +222,15 @@ void |
219 | 219 |
messageSetDispositionType(message *m, const char *disptype) |
220 | 220 |
{ |
221 | 221 |
assert(m != NULL); |
222 |
- assert(disptype != NULL); |
|
223 | 222 |
|
224 |
- m->mimeDispositionType = strdup(disptype); |
|
223 |
+ /* |
|
224 |
+ * It's broken for there to be an entry such as "Content-Disposition:" |
|
225 |
+ * However some spam and viruses are rather broken, it's a sign |
|
226 |
+ * that something is wrong if we get that - maybe we should force a |
|
227 |
+ * scan of this part |
|
228 |
+ */ |
|
229 |
+ if(disptype) |
|
230 |
+ m->mimeDispositionType = strdup(disptype); |
|
225 | 231 |
} |
226 | 232 |
|
227 | 233 |
const char * |