git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@925 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2004/09/23 17:47:10... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Thu Sep 23 09:46:06 BST 2004 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/mbox.c: Scan multipart/digest messages (suggested by "Andrey J. |
|
4 |
+ Melnikoff (TEMHOTA)" <temnota@kmv.ru>) |
|
5 |
+ |
|
1 | 6 |
Wed Sep 22 17:11:23 BST 2004 (njh) |
2 | 7 |
---------------------------------- |
3 | 8 |
* libclamav/mbox.c: Build if libcurl doesn't support |
... | ... |
@@ -17,6 +17,9 @@ |
17 | 17 |
* |
18 | 18 |
* Change History: |
19 | 19 |
* $Log: mbox.c,v $ |
20 |
+ * Revision 1.141 2004/09/23 08:43:25 nigelhorne |
|
21 |
+ * Scan multipart/digest messages |
|
22 |
+ * |
|
20 | 23 |
* Revision 1.140 2004/09/22 16:09:51 nigelhorne |
21 | 24 |
* Build if CURLOPT_DNS_USE_GLOBAL_CACHE isn't supported |
22 | 25 |
* |
... | ... |
@@ -408,7 +411,7 @@ |
408 | 408 |
* Compilable under SCO; removed duplicate code with message.c |
409 | 409 |
* |
410 | 410 |
*/ |
411 |
-static char const rcsid[] = "$Id: mbox.c,v 1.140 2004/09/22 16:09:51 nigelhorne Exp $"; |
|
411 |
+static char const rcsid[] = "$Id: mbox.c,v 1.141 2004/09/23 08:43:25 nigelhorne Exp $"; |
|
412 | 412 |
|
413 | 413 |
#if HAVE_CONFIG_H |
414 | 414 |
#include "clamav-config.h" |
... | ... |
@@ -1391,6 +1394,18 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t |
1391 | 1391 |
free((char *)cptr); |
1392 | 1392 |
if(!isAlternative) |
1393 | 1393 |
break;*/ |
1394 |
+ case DIGEST: |
|
1395 |
+ /* |
|
1396 |
+ * According to section 5.1.5 RFC2046, the |
|
1397 |
+ * default mime type of multipart/digest parts |
|
1398 |
+ * is message/rfc822 |
|
1399 |
+ * |
|
1400 |
+ * We consider them as alternative, wrong in |
|
1401 |
+ * the strictest sense since they aren't |
|
1402 |
+ * alternatives - all parts a valid - but it's |
|
1403 |
+ * OK for our needs since it means each part |
|
1404 |
+ * will be scanned |
|
1405 |
+ */ |
|
1394 | 1406 |
case ALTERNATIVE: |
1395 | 1407 |
cli_dbgmsg("Multipart alternative handler\n"); |
1396 | 1408 |
|
... | ... |
@@ -1656,13 +1671,6 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t |
1656 | 1656 |
|
1657 | 1657 |
/* rc = parseEmailBody(NULL, NULL, dir, rfc821Table, subtypeTable, options); */ |
1658 | 1658 |
break; |
1659 |
- case DIGEST: |
|
1660 |
- /* |
|
1661 |
- * TODO: |
|
1662 |
- * According to section 5.1.5 RFC2046, the |
|
1663 |
- * default mime type of multipart/digest parts |
|
1664 |
- * is message/rfc822 |
|
1665 |
- */ |
|
1666 | 1659 |
case SIGNED: |
1667 | 1660 |
case PARALLEL: |
1668 | 1661 |
/* |
... | ... |
@@ -2642,6 +2650,7 @@ checkURLs(message *m, const char *dir) |
2642 | 2642 |
tableDestroy(t); |
2643 | 2643 |
|
2644 | 2644 |
#if defined(WITH_CURL) && defined(CL_THREAD_SAFE) |
2645 |
+ assert(n <= MAX_URLS); |
|
2645 | 2646 |
cli_dbgmsg("checkURLs: waiting for %d thread(s) to finish\n", n); |
2646 | 2647 |
while(--n >= 0) { |
2647 | 2648 |
pthread_join(tid[n], NULL); |