From: millert Date: Fri, 16 Jan 2015 18:10:31 +0000 (+0000) Subject: Replace check for ">= HOST_NAME_MAX+1" with "> HOST_NAME_MAX". X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9b6be49034617dffa9aecb1b2af0257181cd99ae;p=openbsd Replace check for ">= HOST_NAME_MAX+1" with "> HOST_NAME_MAX". OK deraadt@ --- diff --git a/lib/libc/net/ruserok.c b/lib/libc/net/ruserok.c index fed55e031d0..eed76d97db2 100644 --- a/lib/libc/net/ruserok.c +++ b/lib/libc/net/ruserok.c @@ -245,7 +245,7 @@ __ivaliduser_sa(FILE *hostf, struct sockaddr *raddr, socklen_t salen, auser = *user ? user : luser; ahost = buf; - if (strlen(ahost) >= HOST_NAME_MAX+1) + if (strlen(ahost) > HOST_NAME_MAX) continue; /*