Return CL_EFORMAT on bad format

git-svn: trunk@853
remotes/push_mirror/metadata
Nigel Horne 21 years ago
parent 03bc6e1130
commit b143af4648
  1. 7
      clamav-devel/ChangeLog
  2. 16
      clamav-devel/libclamav/mbox.c

@ -1,3 +1,10 @@
Mon Sep 13 14:17:01 BST 2004 (njh)
----------------------------------
* libclamav/mbox.c: return with CL_EFORMAT if mail can't be parsed
clamav-milter: Updated SESSION code. Not enabled by default - don't
use in a production environment, but testing
feedback would be welcome
Mon Sep 13 11:23:21 BST 2004 (trog)
-----------------------------------
* libclamav: re-write HTML code:

@ -17,6 +17,9 @@
*
* Change History:
* $Log: mbox.c,v $
* Revision 1.116 2004/09/13 13:16:28 nigelhorne
* Return CL_EFORMAT on bad format
*
* Revision 1.115 2004/09/06 11:02:08 nigelhorne
* Normalise HTML before scanning for URLs to download
*
@ -333,7 +336,7 @@
* Compilable under SCO; removed duplicate code with message.c
*
*/
static char const rcsid[] = "$Id: mbox.c,v 1.115 2004/09/06 11:02:08 nigelhorne Exp $";
static char const rcsid[] = "$Id: mbox.c,v 1.116 2004/09/13 13:16:28 nigelhorne Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -418,6 +421,8 @@ typedef enum { FALSE = 0, TRUE = 1 } bool;
#ifdef FOLLOWURLS
#include "htmlnorm.h"
#define MAX_URLS 5 /*
* Maximum number of URLs scanned in a message
* part
@ -716,10 +721,7 @@ cli_mbox(const char *dir, int desc, unsigned int options)
*/
if(messageGetBody(body))
if(!parseEmailBody(body, NULL, dir, rfc821, subtype, options))
/*
* There is no mailformed e-mail return code
*/
retcode = -1;
retcode = CL_EFORMAT;
/*
* Tidy up and quit
@ -1707,7 +1709,8 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t
fileblobSetFilename(fb, dir, "bounce");
fb = textToFileblob(t_line, fb);
fileblobDestroy(fb);
}
} else
cli_dbgmsg("Not found a bounce message\n");
} else {
bool saveIt;
@ -2140,6 +2143,7 @@ checkURLs(message *m, const char *dir)
tableDestroy(t);
return;
}
/* TODO: Do we need to call remove_html_comments? */
/*
* cli_memstr(ptr, len, "<a href=", 8)

Loading…
Cancel
Save