summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/src/mci.c
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2001-01-21 22:17:06 +0000
committergshapiro <gshapiro@FreeBSD.org>2001-01-21 22:17:06 +0000
commit167a83e7b8733416154f871e39e86ba77eb1554d (patch)
tree4f725bdbff499cf7343d2eaeec15f8a0f0926140 /contrib/sendmail/src/mci.c
parentf84ac9120cb7d9f087e5dcb863c4bf25ba2985e6 (diff)
downloadFreeBSD-src-167a83e7b8733416154f871e39e86ba77eb1554d.zip
FreeBSD-src-167a83e7b8733416154f871e39e86ba77eb1554d.tar.gz
Import sendmail 8.11.2
Diffstat (limited to 'contrib/sendmail/src/mci.c')
-rw-r--r--contrib/sendmail/src/mci.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/contrib/sendmail/src/mci.c b/contrib/sendmail/src/mci.c
index 18877ed..073c6bd 100644
--- a/contrib/sendmail/src/mci.c
+++ b/contrib/sendmail/src/mci.c
@@ -12,7 +12,7 @@
*/
#ifndef lint
-static char id[] = "@(#)$Id: mci.c,v 8.133.10.3 2000/06/23 16:17:06 ca Exp $";
+static char id[] = "@(#)$Id: mci.c,v 8.133.10.7 2000/12/12 00:39:34 ca Exp $";
#endif /* ! lint */
#include <sendmail.h>
@@ -274,8 +274,10 @@ mci_flush(doquit, allbut)
return;
for (i = 0; i < MaxMciCache; i++)
+ {
if (allbut != MciCache[i])
mci_uncache(&MciCache[i], doquit);
+ }
}
/*
** MCI_GET -- get information about a particular host
@@ -300,7 +302,7 @@ mci_get(host, m)
(void) mci_scan(NULL);
if (m->m_mno < 0)
- syserr("negative mno %d (%s)", m->m_mno, m->m_name);
+ syserr("!negative mno %d (%s)", m->m_mno, m->m_name);
s = stab(host, ST_MCI + m->m_mno, ST_ENTER);
mci = &s->s_mci;
@@ -383,7 +385,7 @@ mci_match(host, m)
register MCI *mci;
register STAB *s;
- if (m->m_mno < 0)
+ if (m->m_mno < 0 || m->m_mno > MAXMAILERS)
return FALSE;
s = stab(host, ST_MCI + m->m_mno, ST_FIND);
if (s == NULL)
@@ -460,7 +462,7 @@ static struct mcifbits MciFlags[] =
{ MCIF_8BITOK, "8BITOK" },
{ MCIF_CVT7TO8, "CVT7TO8" },
{ MCIF_INMIME, "INMIME" },
- { 0, NULL }
+ { 0, NULL }
};
@@ -1327,12 +1329,12 @@ mci_generate_persistent_path(host, path, pathlen, createflag)
#if NETINET || NETINET6
/* check for bogus bracketed address */
- if (host[0] == '[' &&
+ if (host[0] == '['
# if NETINET6
- inet_pton(AF_INET6, t_host, &in6_addr) != 1 &&
+ && inet_pton(AF_INET6, t_host, &in6_addr) != 1
# endif /* NETINET6 */
# if NETINET
- inet_addr(t_host) == INADDR_NONE
+ && inet_addr(t_host) == INADDR_NONE
# endif /* NETINET */
)
return -1;
OpenPOWER on IntegriCloud