Browse code

Save content-type: application only once

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

Nigel Horne authored on 2005/01/07 22:51:49
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Fri Jan  7 13:50:52 GMT 2005 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c:	Fix to "content-type: application" which could cause
4
+				the attachment to be scanned twice
5
+
1 6
 Thu Jan  6 23:24:35 GMT 2005 (njh)
2 7
 ----------------------------------
3 8
   * libclamav/mbox.c:	Better handler of single quotes in headers
... ...
@@ -17,6 +17,9 @@
17 17
  *
18 18
  * Change History:
19 19
  * $Log: mbox.c,v $
20
+ * Revision 1.208  2005/01/07 13:48:46  nigelhorne
21
+ * Save content-type: application only once
22
+ *
20 23
  * Revision 1.207  2005/01/06 23:21:34  nigelhorne
21 24
  * Improved handling of quotes over multiple lines in headers
22 25
  *
... ...
@@ -609,7 +612,7 @@
609 609
  * Compilable under SCO; removed duplicate code with message.c
610 610
  *
611 611
  */
612
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.207 2005/01/06 23:21:34 nigelhorne Exp $";
612
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.208 2005/01/07 13:48:46 nigelhorne Exp $";
613 613
 
614 614
 #if HAVE_CONFIG_H
615 615
 #include "clamav-config.h"
... ...
@@ -2687,7 +2690,11 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t
2687 2687
 				if(fb) {
2688 2688
 					cli_dbgmsg("Saving main message as attachment\n");
2689 2689
 					fileblobDestroy(fb);
2690
-					messageClearMarkers(mainMessage);
2690
+					if(mainMessage != messageIn) {
2691
+						messageDestroy(mainMessage);
2692
+						mainMessage = NULL;
2693
+					} else
2694
+						messageReset(mainMessage);
2691 2695
 				}
2692 2696
 			} /*else
2693 2697
 				cli_warnmsg("Discarded application not sent as attachment\n");*/