summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sendmail/src/mci.c
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1995-02-23 00:20:00 +0000
committerpst <pst@FreeBSD.org>1995-02-23 00:20:00 +0000
commit37063bd4edb87b70b019d35bddf18209ab478c44 (patch)
treec2ec59123a60e285b451f58acfbedc78a4aab7f2 /usr.sbin/sendmail/src/mci.c
parentbabe0fd0e29aedfa2e1d473fbb3dcec915a3b575 (diff)
downloadFreeBSD-src-37063bd4edb87b70b019d35bddf18209ab478c44.zip
FreeBSD-src-37063bd4edb87b70b019d35bddf18209ab478c44.tar.gz
Sendmail 8.6.10 update for security problems.
Imported on CSRG/V_8_6_10 branch. Obtained from: CSRG/Allman
Diffstat (limited to 'usr.sbin/sendmail/src/mci.c')
-rw-r--r--usr.sbin/sendmail/src/mci.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/usr.sbin/sendmail/src/mci.c b/usr.sbin/sendmail/src/mci.c
index 8160b83..8211a62 100644
--- a/usr.sbin/sendmail/src/mci.c
+++ b/usr.sbin/sendmail/src/mci.c
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)mci.c 8.13 (Berkeley) 4/12/94";
+static char sccsid[] = "@(#)mci.c 8.14 (Berkeley) 5/15/94";
#endif /* not lint */
#include "sendmail.h"
@@ -83,18 +83,17 @@ mci_cache(mci)
register MCI **mcislot;
extern MCI **mci_scan();
- if (MaxMciCache <= 0)
- {
- /* we don't support caching */
- return;
- }
-
/*
** Find the best slot. This may cause expired connections
** to be closed.
*/
mcislot = mci_scan(mci);
+ if (mcislot == NULL)
+ {
+ /* we don't support caching */
+ return;
+ }
/* if this is already cached, we are done */
if (bitset(MCIF_CACHED, mci->mci_flags))
@@ -136,6 +135,12 @@ mci_scan(savemci)
register MCI *mci;
register int i;
+ if (MaxMciCache <= 0)
+ {
+ /* we don't support caching */
+ return NULL;
+ }
+
if (MciCache == NULL)
{
/* first call */
@@ -267,6 +272,7 @@ mci_get(host, m)
{
register MCI *mci;
register STAB *s;
+ extern MCI **mci_scan();
#ifdef DAEMON
extern SOCKADDR CurHostAddr;
@@ -276,7 +282,7 @@ mci_get(host, m)
#endif
/* clear out any expired connections */
- mci_scan(NULL);
+ (void) mci_scan(NULL);
if (m->m_mno < 0)
syserr("negative mno %d (%s)", m->m_mno, m->m_name);
OpenPOWER on IntegriCloud