From e906fef3ec20d1cdb2c4788916b8dd608ec89655 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Thu, 24 Jan 2008 13:58:46 +0000 Subject: [PATCH] Use cli_strcasestr git-svn: trunk@3538 --- ChangeLog | 4 ++++ libclamav/mbox.c | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9fc31e6b9..7c83efeea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Jan 24 13:35:51 GMT 2008 (njh) +---------------------------------- + * libclamav/mbox.c: Use cli_strcasestr + Thu Jan 24 15:01:03 CET 2008 (acab) ----------------------------------- * libclamav: realign structs (related to bb#474) diff --git a/libclamav/mbox.c b/libclamav/mbox.c index 51bcfaa84..0b71780c1 100644 --- a/libclamav/mbox.c +++ b/libclamav/mbox.c @@ -46,6 +46,9 @@ static char const rcsid[] = "$Id: mbox.c,v 1.381 2007/02/15 12:26:44 njh Exp $"; #ifdef HAVE_STRINGS_H #include #endif +#ifdef HAVE_STRING_H +#include +#endif #include #include #include @@ -187,10 +190,6 @@ typedef unsigned int in_addr_t; #define EISCONN WSAEISCONN #endif -#ifndef HAVE_STRCASESTR -#define strcasestr(h, n) strstr(h, n) /* This will cause isBounceMessage() to match too much */ -#endif - /* * Define this to handle messages covered by section 7.3.2 of RFC1341. * This is experimental code so it is up to YOU to (1) ensure it's secure @@ -2880,7 +2879,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re * Don't bother with text/plain or * text/html */ - if(strcasestr(s, "text/plain") != NULL) + if(cli_strcasestr(s, "text/plain") != NULL) /* * Don't bother to save the * unuseful part, read past @@ -2890,7 +2889,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re */ continue; if((!doPhishingScan) && - (strcasestr(s, "text/html") != NULL)) + (cli_strcasestr(s, "text/html") != NULL)) continue; break; }