Browse code

Use limits.maxmailrec

git-svn: trunk@2561

Nigel Horne authored on 2006/12/19 02:05:14
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Dec 18 17:04:31 GMT 2006 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c:	Use limits.maxmailrec (patch from TK)
4
+
1 5
 Sat Dec 16 16:57:27 GMT 2006 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/pst.c:	Fixed typo
... ...
@@ -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.361 2006/11/30 09:35:22 njh Exp $";
19
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.362 2006/12/18 17:03:58 njh Exp $";
20 20
 
21 21
 #ifdef	_MSC_VER
22 22
 #include <winsock.h>	/* only needed in CL_EXPERIMENTAL */
... ...
@@ -2042,16 +2042,10 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re
2042 2042
 
2043 2043
 	cli_dbgmsg("in parseEmailBody\n");
2044 2044
 
2045
-	/*
2046
-	 * FIXME: Using ArchiveMaxRecursion is not good since that is
2047
-	 *	typically rather low (default = 8) and it would be better for
2048
-	 *	this code to use a higher limit. Needs support in the cl_limits
2049
-	 *	structure
2050
-	 */
2051
-	if(mctx->ctx->limits->maxreclevel)
2052
-		if(recursion_level >= mctx->ctx->limits->maxreclevel) {
2045
+	if(mctx->ctx->limits->maxmailrec)
2046
+		if(recursion_level >= mctx->ctx->limits->maxmailrec) {
2053 2047
 			cli_warnmsg("parseEmailBody: hit maximum recursion level (%u)\n",
2054
-				mctx->ctx->limits->maxreclevel);
2048
+				mctx->ctx->limits->maxmailrec);
2055 2049
 			return 2;
2056 2050
 		}
2057 2051