From 19c8fca2df7a6f39e5208229f428ec269fb3adbf Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 7 Feb 1999 09:40:41 +0000 Subject: Import sendmail 8.9.3 onto vendor branch, replacing previous interim 8.9.2 + patches version. Obtained from: ftp.sendmail.org --- contrib/sendmail/src/collect.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) (limited to 'contrib/sendmail/src/collect.c') diff --git a/contrib/sendmail/src/collect.c b/contrib/sendmail/src/collect.c index 7e68f40..a8916b1 100644 --- a/contrib/sendmail/src/collect.c +++ b/contrib/sendmail/src/collect.c @@ -11,7 +11,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)collect.c 8.91 (Berkeley) 8/19/1998"; +static char sccsid[] = "@(#)collect.c 8.93 (Berkeley) 1/26/1999"; #endif /* not lint */ # include @@ -78,8 +78,7 @@ collect(fp, smtpmode, hdrp, e) volatile int istate; volatile int mstate; u_char *volatile pbp; - int nhdrlines = 0; - int hdrlinelen = 0; + int hdrslen = 0; u_char peekbuf[8]; char dfname[MAXQFNAME]; char bufbuf[MAXLINE]; @@ -201,7 +200,6 @@ collect(fp, smtpmode, hdrp, e) switch (istate) { case IS_BOL: - hdrlinelen = 0; if (c == '.') { istate = IS_DOT; @@ -309,18 +307,18 @@ bufferchar: else if (c != '\0') { *bp++ = c; - if (MaxHeaderLineLength > 0 && - ++hdrlinelen > MaxHeaderLineLength) + if (MaxHeadersLength > 0 && + ++hdrslen > MaxHeadersLength) { sm_syslog(LOG_NOTICE, e->e_id, - "header line too long (%d max) from %s during message collect", - MaxHeaderLineLength, + "headers too large (%d max) from %s during message collect", + MaxHeadersLength, CurHostName != NULL ? CurHostName : "localhost"); errno = 0; e->e_flags |= EF_CLRQUEUE; e->e_status = "5.6.0"; - usrerr("552 Header line too long (%d max)", - MaxHeaderLineLength); + usrerr("552 Headers too large (%d max)", + MaxHeadersLength); mstate = MS_DISCARD; } } @@ -356,22 +354,6 @@ nextstate: goto nextstate; } - if (MaxHeaderLines > 0 && - ++nhdrlines > MaxHeaderLines) - { - sm_syslog(LOG_NOTICE, e->e_id, - "too many header lines (%d max) from %s during message collect", - MaxHeaderLines, - CurHostName != NULL ? CurHostName : "localhost"); - errno = 0; - e->e_flags |= EF_CLRQUEUE; - e->e_status = "5.6.0"; - usrerr("552 Too many header lines (%d max)", - MaxHeaderLines); - mstate = MS_DISCARD; - break; - } - /* check for possible continuation line */ do { -- cgit v1.1