Browse code

Fix RFC2298 handling broken by RFC1341 code

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@974 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2004/10/07 02:21:30
Showing 1 changed files
... ...
@@ -17,6 +17,9 @@
17 17
  *
18 18
  * Change History:
19 19
  * $Log: mbox.c,v $
20
+ * Revision 1.149  2004/10/06 17:21:30  nigelhorne
21
+ * Fix RFC2298 handling broken by RFC1341 code
22
+ *
20 23
  * Revision 1.148  2004/10/05 15:41:53  nigelhorne
21 24
  * First draft of code to handle RFC1341
22 25
  *
... ...
@@ -432,7 +435,7 @@
432 432
  * Compilable under SCO; removed duplicate code with message.c
433 433
  *
434 434
  */
435
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.148 2004/10/05 15:41:53 nigelhorne Exp $";
435
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.149 2004/10/06 17:21:30 nigelhorne Exp $";
436 436
 
437 437
 #if HAVE_CONFIG_H
438 438
 #include "clamav-config.h"
... ...
@@ -547,7 +550,7 @@ typedef enum	{ FALSE = 0, TRUE = 1 } bool;
547 547
  *	This is experimental code so it is up to YOU to (1) ensure it's secure
548 548
  * (2) peridically trim the directory of old files
549 549
  */
550
-/*#define	PARTIAL_DIR	"/tmp/partial"	/* FIXME: should be config based on TMPDIR */
550
+#define	PARTIAL_DIR	"/tmp/partial"	/* FIXME: should be config based on TMPDIR */
551 551
 
552 552
 static	message	*parseEmailHeaders(const message *m, const table_t *rfc821Table);
553 553
 static	int	parseEmailHeader(message *m, const char *line, const table_t *rfc821Table);
... ...
@@ -1819,10 +1822,11 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t
1819 1819
 					messageDestroy(m);
1820 1820
 				}
1821 1821
 				break;
1822
-			} else if(strcasecmp(mimeSubtype, "disposition-notification") == 0)
1822
+			} else if(strcasecmp(mimeSubtype, "disposition-notification") == 0) {
1823 1823
 				/* RFC 2298 - handle like a normal email */
1824
+				rc = 1;
1824 1825
 				break;
1825
-			else if(strcasecmp(mimeSubtype, "partial") == 0) {
1826
+			} else if(strcasecmp(mimeSubtype, "partial") == 0) {
1826 1827
 #ifdef	PARTIAL_DIR
1827 1828
 				/* RFC1341 message split over many emails */
1828 1829
 				if(rfc1341(mainMessage, dir) >= 0)