diff options
Diffstat (limited to 'contrib/sendmail/libsm/refill.c')
-rw-r--r-- | contrib/sendmail/libsm/refill.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/sendmail/libsm/refill.c b/contrib/sendmail/libsm/refill.c index 10c7cde..6e06783 100644 --- a/contrib/sendmail/libsm/refill.c +++ b/contrib/sendmail/libsm/refill.c @@ -13,7 +13,7 @@ */ #include <sm/gen.h> -SM_RCSID("@(#)$Id: refill.c,v 1.49 2001/09/11 04:04:49 gshapiro Exp $") +SM_RCSID("@(#)$Id: refill.c,v 1.49.2.1 2002/09/09 21:38:08 gshapiro Exp $") #include <stdlib.h> #include <unistd.h> #include <errno.h> @@ -65,6 +65,11 @@ static int sm_lflush __P((SM_FILE_T *, int *)); errno = EAGAIN; \ return SM_IO_EOF; \ } \ + if (FD_SETSIZE > 0 && (fd) >= FD_SETSIZE) \ + { \ + errno = EINVAL; \ + return SM_IO_EOF; \ + } \ FD_ZERO(&sm_io_to_mask); \ FD_SET((fd), &sm_io_to_mask); \ FD_ZERO(&sm_io_x_mask); \ |