From ba6b8b71eae805e4cbbe856ee8f1b9c790d6f143 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 27 Jun 2008 00:22:43 +0000 Subject: [PATCH] Fix off-by-one error in range check on file descriptor number ticket: new target_version: 1.6.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20478 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/sendto_kdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index cd40cb67b..87d78c8a0 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -671,7 +671,7 @@ start_connection (struct conn_state *state, dprint("socket: %m creating with af %d\n", state->err, ai->ai_family); return -1; /* try other hosts */ } - if (fd > FD_SETSIZE) { + if (fd >= FD_SETSIZE) { close(fd); state->err = EMFILE; dprint("socket: fd %d too high\n", fd); -- 2.26.2