Browse code

Some HTML.Phishing.Bank-512 being found (bug 33)

git-svn: trunk@2582

Nigel Horne authored on 2006/12/29 00:10:23
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Thu Dec 28 15:09:37 GMT 2006 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c:	Some HTML.Phishing.Bank-512 being found (bug 33)
4
+
1 5
 Wed Dec 27 23:14:57 GMT 2006 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/mbox.c:	Code tidy
... ...
@@ -16,7 +16,7 @@
16 16
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 17
  *  MA 02110-1301, USA.
18 18
  */
19
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.366 2006/12/27 23:18:49 njh Exp $";
19
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.367 2006/12/28 15:07:55 njh Exp $";
20 20
 
21 21
 #ifdef	_MSC_VER
22 22
 #include <winsock.h>	/* only needed in CL_EXPERIMENTAL */
... ...
@@ -2032,7 +2032,7 @@ parseEmailHeader(message *m, const char *line, const table_t *rfc821)
2032 2032
 static mbox_status
2033 2033
 parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int recursion_level)
2034 2034
 {
2035
-	mbox_status rc = OK;
2035
+	mbox_status rc;
2036 2036
 	text *aText = textIn;
2037 2037
 	message *mainMessage = messageIn;
2038 2038
 	fileblob *fb;
... ...
@@ -2064,6 +2064,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re
2064 2064
 
2065 2065
 		cli_dbgmsg("Parsing mail file\n");
2066 2066
 
2067
+		rc = OK;
2067 2068
 		mimeType = messageGetMimeType(mainMessage);
2068 2069
 		mimeSubtype = messageGetMimeSubtype(mainMessage);
2069 2070
 
... ...
@@ -2179,7 +2180,8 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re
2179 2179
 							infected = TRUE;
2180 2180
 							break;
2181 2181
 						}
2182
-					} else if(encodingLine(mainMessage) == t_line->t_next) {
2182
+					} else if(t_line->t_next &&
2183
+					          (encodingLine(mainMessage) == t_line->t_next)) {
2183 2184
 						/*
2184 2185
 						 * We look for the next line
2185 2186
 						 * since later on we'll skip
... ...
@@ -2189,7 +2191,8 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re
2189 2189
 						 * which it would have been in
2190 2190
 						 * an RFC compliant world
2191 2191
 						 */
2192
-						cli_dbgmsg("Found MIME attachment before the first MIME section\n");
2192
+						cli_dbgmsg("Found MIME attachment before the first MIME section \"%s\"\n",
2193
+							lineGetData(t_line->t_next->t_line));
2193 2194
 						if(messageGetEncoding(mainMessage) == NOENCODING)
2194 2195
 							break;
2195 2196
 					}