diff options
-rw-r--r-- | erts/epmd/src/epmd_srv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c index 2f4f189bb4..c37ca197f5 100644 --- a/erts/epmd/src/epmd_srv.c +++ b/erts/epmd/src/epmd_srv.c @@ -1054,6 +1054,12 @@ static int conn_open(EpmdVars *g,int fd) int i; Connection *s; + if (fd >= FD_SETSIZE) { + dbg_tty_printf(g,0,"fd does not fit in fd_set fd=%d, FD_SETSIZE=%d",fd, FD_SETSIZE); + close(fd); + return EPMD_FALSE; + } + for (i = 0; i < g->max_conn; i++) { if (g->conn[i].open == EPMD_FALSE) { g->active_conn++; |