git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1164 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2004/12/07 18:01:24... | ... |
@@ -17,6 +17,9 @@ |
17 | 17 |
* |
18 | 18 |
* Change History: |
19 | 19 |
* $Log: mbox.c,v $ |
20 |
+ * Revision 1.199 2004/12/07 09:01:24 nigelhorne |
|
21 |
+ * Tidy |
|
22 |
+ * |
|
20 | 23 |
* Revision 1.198 2004/12/04 16:03:55 nigelhorne |
21 | 24 |
* Text/plain now handled as no encoding |
22 | 25 |
* |
... | ... |
@@ -582,7 +585,7 @@ |
582 | 582 |
* Compilable under SCO; removed duplicate code with message.c |
583 | 583 |
* |
584 | 584 |
*/ |
585 |
-static char const rcsid[] = "$Id: mbox.c,v 1.198 2004/12/04 16:03:55 nigelhorne Exp $"; |
|
585 |
+static char const rcsid[] = "$Id: mbox.c,v 1.199 2004/12/07 09:01:24 nigelhorne Exp $"; |
|
586 | 586 |
|
587 | 587 |
#if HAVE_CONFIG_H |
588 | 588 |
#include "clamav-config.h" |
... | ... |
@@ -1203,11 +1206,13 @@ parseEmailHeaders(const message *m, const table_t *rfc821) |
1203 | 1203 |
fullline = ptr; |
1204 | 1204 |
} |
1205 | 1205 |
|
1206 |
- if(parseEmailHeader(ret, fullline, rfc821) < 0) |
|
1207 |
- continue; |
|
1206 |
+ if(fullline) { |
|
1207 |
+ if(parseEmailHeader(ret, fullline, rfc821) < 0) |
|
1208 |
+ continue; |
|
1208 | 1209 |
|
1209 |
- free(fullline); |
|
1210 |
- fullline = NULL; |
|
1210 |
+ free(fullline); |
|
1211 |
+ fullline = NULL; |
|
1212 |
+ } |
|
1211 | 1213 |
} |
1212 | 1214 |
} else |
1213 | 1215 |
/*cli_dbgmsg("Add line to body '%s'\n", buffer);*/ |
... | ... |
@@ -1365,10 +1370,11 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t |
1365 | 1365 |
/* |
1366 | 1366 |
* RFC1892/RFC3462: section 2 text/rfc822-headers |
1367 | 1367 |
* incorrectly sent as message/rfc822-headers |
1368 |
+ * |
|
1369 |
+ * Parse as text/plain, i.e. no mime |
|
1368 | 1370 |
*/ |
1369 | 1371 |
cli_dbgmsg("Changing message/rfc822-headers to text/rfc822-headers\n"); |
1370 |
- mimeType = TEXT; |
|
1371 |
- subtype = PLAIN; /* parse as text/plain */ |
|
1372 |
+ mimeType = NOMIME; |
|
1372 | 1373 |
} |
1373 | 1374 |
|
1374 | 1375 |
cli_dbgmsg("mimeType = %d\n", mimeType); |