From: Ken Raeburn Date: Fri, 27 Jun 2008 00:22:43 +0000 (+0000) Subject: Fix off-by-one error in range check on file descriptor number X-Git-Tag: krb5-1.7-alpha1~631 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ba6b8b71eae805e4cbbe856ee8f1b9c790d6f143;p=krb5.git 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 --- 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);