git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1167 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2004/12/08 08:12:20... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Tue Dec 7 23:10:36 GMT 2004 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/mbox.c: Handle empty content-type in multipart headers, e.g. |
|
4 |
+ Content-Type: ; name="/tmp/foo/bar.txt" |
|
5 |
+ |
|
1 | 6 |
Tue Dec 7 23:40:30 CET 2004 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* configure: added --disable-zlib-vcheck (allows building on potentially |
... | ... |
@@ -17,6 +17,9 @@ |
17 | 17 |
* |
18 | 18 |
* Change History: |
19 | 19 |
* $Log: mbox.c,v $ |
20 |
+ * Revision 1.200 2004/12/07 23:08:10 nigelhorne |
|
21 |
+ * Fix empty content-type in multipart header |
|
22 |
+ * |
|
20 | 23 |
* Revision 1.199 2004/12/07 09:01:24 nigelhorne |
21 | 24 |
* Tidy |
22 | 25 |
* |
... | ... |
@@ -585,7 +588,7 @@ |
585 | 585 |
* Compilable under SCO; removed duplicate code with message.c |
586 | 586 |
* |
587 | 587 |
*/ |
588 |
-static char const rcsid[] = "$Id: mbox.c,v 1.199 2004/12/07 09:01:24 nigelhorne Exp $"; |
|
588 |
+static char const rcsid[] = "$Id: mbox.c,v 1.200 2004/12/07 23:08:10 nigelhorne Exp $"; |
|
589 | 589 |
|
590 | 590 |
#if HAVE_CONFIG_H |
591 | 591 |
#include "clamav-config.h" |
... | ... |
@@ -2725,7 +2728,7 @@ parseMimeHeader(message *m, const char *cmd, const table_t *rfc821Table, const c |
2725 | 2725 |
* and |
2726 | 2726 |
* Content-Type: multipart/mixed foo/bar |
2727 | 2727 |
*/ |
2728 |
- for(;;) { |
|
2728 |
+ if(s && *s) for(;;) { |
|
2729 | 2729 |
#ifdef CL_THREAD_SAFE |
2730 | 2730 |
int set = messageSetMimeType(m, strtok_r(s, "/", &strptr)); |
2731 | 2731 |
#else |
... | ... |
@@ -2769,7 +2772,8 @@ parseMimeHeader(message *m, const char *cmd, const table_t *rfc821Table, const c |
2769 | 2769 |
if(*s == '\0') |
2770 | 2770 |
break; |
2771 | 2771 |
} |
2772 |
- free(mimeType); |
|
2772 |
+ if(mimeType) |
|
2773 |
+ free(mimeType); |
|
2773 | 2774 |
} |
2774 | 2775 |
} |
2775 | 2776 |
|