summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/src/deliver.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail/src/deliver.c')
-rw-r--r--contrib/sendmail/src/deliver.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/contrib/sendmail/src/deliver.c b/contrib/sendmail/src/deliver.c
index 2cb6e3f..af6e41f 100644
--- a/contrib/sendmail/src/deliver.c
+++ b/contrib/sendmail/src/deliver.c
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sys/time.h>
-SM_RCSID("@(#)$Id: deliver.c,v 8.940.2.15 2003/02/07 17:57:43 ca Exp $")
+SM_RCSID("@(#)$Id: deliver.c,v 8.940.2.18 2003/03/28 17:34:39 ca Exp $")
#if HASSETUSERCONTEXT
# include <login_cap.h>
@@ -1158,7 +1158,7 @@ coloncmp(a, b)
/* Need to account for IPv6 bracketed addresses */
if (*a == '[')
braclev++;
- else if (*a == '[' && braclev > 0)
+ else if (*a == ']' && braclev > 0)
braclev--;
else if (*a == ':' && braclev <= 0)
{
@@ -1626,7 +1626,7 @@ deliver(e, firstto)
}
#if _FFR_STRIPBACKSL
/*
- ** Strip one leading backslash if requesting and the
+ ** Strip one leading backslash if requested and the
** next character is alphanumerical (the latter can
** probably relaxed a bit, see RFC2821).
*/
@@ -4719,7 +4719,11 @@ putbody(mci, e, separator)
{
pos += bp - buf;
if (c != '\r')
+ {
+ SM_ASSERT(pbp < peekbuf +
+ sizeof(peekbuf));
*pbp++ = c;
+ }
}
bp = buf;
@@ -4759,6 +4763,7 @@ putbody(mci, e, separator)
}
/* had a naked carriage return */
+ SM_ASSERT(pbp < peekbuf + sizeof(peekbuf));
*pbp++ = c;
c = '\r';
ostate = OS_INLINE;
@@ -4787,7 +4792,11 @@ putch:
else if ((d = sm_io_getc(e->e_dfp,
SM_TIME_DEFAULT))
!= SM_IO_EOF)
+ {
+ SM_ASSERT(pbp < peekbuf +
+ sizeof(peekbuf));
*pbp++ = d;
+ }
if (d == '\n' || d == SM_IO_EOF)
{
@@ -4837,6 +4846,8 @@ putch:
mci->mci_mailer->m_eol);
}
ostate = OS_HEAD;
+ SM_ASSERT(pbp < peekbuf +
+ sizeof(peekbuf));
*pbp++ = c;
continue;
}
OpenPOWER on IntegriCloud