diff options
author | Gregory Neil Shapiro <gshapiro@FreeBSD.org> | 2003-02-08 20:31:29 +0000 |
---|---|---|
committer | Gregory Neil Shapiro <gshapiro@FreeBSD.org> | 2003-02-08 20:31:29 +0000 |
commit | 13bd19636bde9fea5821698cb77c32edee6a9ac9 (patch) | |
tree | 2e81c43d391ed220f6656502de14ddfbb0de4ecd /contrib/sendmail/src/control.c | |
parent | 959366dcbe20824a331bcae977d662025850f481 (diff) |
Notes
Diffstat (limited to 'contrib/sendmail/src/control.c')
-rw-r--r-- | contrib/sendmail/src/control.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/sendmail/src/control.c b/contrib/sendmail/src/control.c index 88ff72f34fc8..d36dc66f1664 100644 --- a/contrib/sendmail/src/control.c +++ b/contrib/sendmail/src/control.c @@ -10,7 +10,9 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: control.c,v 8.118 2002/03/19 00:23:27 gshapiro Exp $") +SM_RCSID("@(#)$Id: control.c,v 8.118.4.3 2002/11/14 00:15:56 ca Exp $") + +#include <sm/fdset.h> /* values for cmd_code */ #define CMDERROR 0 /* bad command */ @@ -90,6 +92,12 @@ opencontrolsocket() ControlSocket = socket(AF_UNIX, SOCK_STREAM, 0); if (ControlSocket < 0) return -1; + if (SM_FD_SETSIZE > 0 && ControlSocket >= SM_FD_SETSIZE) + { + clrcontrol(); + errno = EINVAL; + return -1; + } (void) unlink(ControlSocketName); memset(&controladdr, '\0', sizeof controladdr); |