Not all binhex messages were being decoded

git-svn: trunk@2279
remotes/push_mirror/metadata
Nigel Horne 19 years ago
parent 647a4f8d68
commit c691512c5b
  1. 5
      clamav-devel/ChangeLog
  2. 10
      clamav-devel/libclamav/mbox.c
  3. 16
      clamav-devel/libclamav/message.c

@ -1,3 +1,8 @@
Sat Sep 16 10:54:30 BST 2006 (njh)
----------------------------------
* libclamav/message.c: Not all binhex messages were being decoded
in experimental mode
Fri Sep 15 17:28:24 BST 2006 (njh)
----------------------------------
* libclamav/phishcheck.c: Better way to find length of data to be

@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
static char const rcsid[] = "$Id: mbox.c,v 1.332 2006/09/16 08:30:55 njh Exp $";
static char const rcsid[] = "$Id: mbox.c,v 1.333 2006/09/16 09:53:56 njh Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -2008,8 +2008,8 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx)
checkURLs(mainMessage, mctx, &rc,subtype==HTML);/* there might be html sent without subtype html too,
so scan them for phishing too*/
#ifdef CL_EXPERIMENTAL
if(rc==3)
infected=TRUE;
if(rc == 3)
infected=TRUE;
}
#endif
break;
@ -3823,8 +3823,8 @@ checkURLs(message *mainMessage, mbox_ctx *mctx, int *rc, int is_html)
cli_dbgmsg("PH:Phishing found\n");
}
}
if(is_html && mctx->ctx->options&CL_SCAN_MAILURL)
do_checkURLs(mainMessage, mctx->dir,&hrefs);
if(is_html && (mctx->ctx->options&CL_SCAN_MAILURL) && (*rc != 3))
do_checkURLs(mainMessage, mctx->dir, &hrefs);
}
hrefs_done(b,&hrefs);
}

@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
static char const rcsid[] = "$Id: message.c,v 1.185 2006/09/13 20:55:02 njh Exp $";
static char const rcsid[] = "$Id: message.c,v 1.186 2006/09/16 09:53:56 njh Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -1315,9 +1315,11 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy
blobDestroy(tmp);
m->binhex = NULL;
if(destroy_text)
m->binhex = NULL;
if((m->numberOfEncTypes == 1) && (m->encodingTypes[0] == BINHEX)) {
if((m->numberOfEncTypes == 0) ||
((m->numberOfEncTypes == 1) && (m->encodingTypes[0] == BINHEX))) {
cli_dbgmsg("Finished exporting binhex file\n");
return ret;
}
@ -1327,6 +1329,8 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy
/*
* Fast copy
*/
cli_dbgmsg("messageExport: Entering fast copy mode\n");
filename = (char *)messageFindArgument(m, "filename");
if(filename == NULL) {
filename = (char *)messageFindArgument(m, "name");
@ -1581,7 +1585,11 @@ messageToFileblob(message *m, const char *dir, int destroy)
blob *
messageToBlob(message *m, int destroy)
{
blob *b = messageExport(m, NULL,
blob *b;
cli_dbgmsg("messageToBlob\n");
b = messageExport(m, NULL,
(void *(*)(void))blobCreate,
(void(*)(void *))blobDestroy,
(void(*)(void *, const char *, const char *))blobSetFilename,

Loading…
Cancel
Save