Fix off-by-one error in range check on file descriptor number
authorKen Raeburn <raeburn@mit.edu>
Fri, 27 Jun 2008 00:22:43 +0000 (00:22 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 27 Jun 2008 00:22:43 +0000 (00:22 +0000)
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

index cd40cb67bb170774b0b14deeed647f1c32bb7df3..87d78c8a05482f091f2c6b4ac01832a0e41d8f9d 100644 (file)
@@ -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);