Browse code

Changes handling of unbalanced quotes in multipart headers

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

Nigel Horne authored on 2005/01/02 00:55:26
Showing 1 changed files
... ...
@@ -17,6 +17,9 @@
17 17
  *
18 18
  * Change History:
19 19
  * $Log: mbox.c,v $
20
+ * Revision 1.205  2005/01/01 15:55:26  nigelhorne
21
+ * Changes handling of unbalanced quotes in multipart headers
22
+ *
20 23
  * Revision 1.204  2004/12/19 23:19:54  nigelhorne
21 24
  * Tidy
22 25
  *
... ...
@@ -600,7 +603,7 @@
600 600
  * Compilable under SCO; removed duplicate code with message.c
601 601
  *
602 602
  */
603
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.204 2004/12/19 23:19:54 nigelhorne Exp $";
603
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.205 2005/01/01 15:55:26 nigelhorne Exp $";
604 604
 
605 605
 #if HAVE_CONFIG_H
606 606
 #include "clamav-config.h"
... ...
@@ -2129,8 +2132,10 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t
2129 2129
 						while(next && next->t_line) {
2130 2130
 							const char *data = lineGetData(next->t_line);
2131 2131
 
2132
-							if((!isspace(data[0])) &&
2132
+							/*if((!isspace(data[0])) &&
2133 2133
 							   ((quotes & 1) == 0))
2134
+								break;*/
2135
+							if(!isspace(data[0]))
2134 2136
 								break;
2135 2137
 
2136 2138
 							ptr = cli_realloc(fullline,
... ...
@@ -2142,9 +2147,9 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t
2142 2142
 							fullline = ptr;
2143 2143
 							strcat(fullline, data);
2144 2144
 
2145
-							for(qptr = data; *qptr; qptr++)
2145
+							/*for(qptr = data; *qptr; qptr++)
2146 2146
 								if(*qptr == '\"')
2147
-									quotes++;
2147
+									quotes++;*/
2148 2148
 
2149 2149
 							t_line = next;
2150 2150
 							next = next->t_next;
... ...
@@ -2583,8 +2588,7 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t
2583 2583
 					cli_dbgmsg("Save non mime and/or text/plain part\n");
2584 2584
 					fileblobSetFilename(fb, dir, "textpart");
2585 2585
 					/*fileblobAddData(fb, "Received: by clamd (textpart)\n", 30);*/
2586
-
2587
-					fb = textToFileblob(aText, fb);
2586
+					(void)textToFileblob(aText, fb);
2588 2587
 
2589 2588
 					fileblobDestroy(fb);
2590 2589
 				}
... ...
@@ -3968,7 +3972,7 @@ print_trace(int use_syslog)
3968 3968
 
3969 3969
 	for(i = 0; i < size; i++)
3970 3970
 		if(use_syslog)
3971
-			syslog(LOG_ERR, "bt[%d]: %s", (int)i, strings[i]);
3971
+			syslog(LOG_ERR, "bt[%u]: %s", i, strings[i]);
3972 3972
 		else
3973 3973
 			cli_dbgmsg("%s\n", strings[i]);
3974 3974