From 9b6be49034617dffa9aecb1b2af0257181cd99ae Mon Sep 17 00:00:00 2001 From: millert Date: Fri, 16 Jan 2015 18:10:31 +0000 Subject: [PATCH] Replace check for ">= HOST_NAME_MAX+1" with "> HOST_NAME_MAX". OK deraadt@ --- lib/libc/net/ruserok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; /* -- 2.20.1