summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/rcmd.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1998-02-12 02:21:19 +0000
committerderaadt <deraadt@openbsd.org>1998-02-12 02:21:19 +0000
commit9428f4d39bf4384dd4a40b90206a0978b9778952 (patch)
tree5633a04e03907677be8f1a8cf1300fdbdb264669 /lib/libc/net/rcmd.c
parentcopyright (diff)
downloadwireguard-openbsd-9428f4d39bf4384dd4a40b90206a0978b9778952.tar.xz
wireguard-openbsd-9428f4d39bf4384dd4a40b90206a0978b9778952.zip
correct bounds check
Diffstat (limited to 'lib/libc/net/rcmd.c')
-rw-r--r--lib/libc/net/rcmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c
index 44e4ad3b5cd..ad701acf0e9 100644
--- a/lib/libc/net/rcmd.c
+++ b/lib/libc/net/rcmd.c
@@ -34,7 +34,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rcmd.c,v 1.29 1998/02/12 00:48:09 deraadt Exp $";
+static char *rcsid = "$OpenBSD: rcmd.c,v 1.30 1998/02/12 02:21:19 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -448,7 +448,7 @@ __ivaliduser(hostf, raddrl, luser, ruser)
auser = *user ? user : luser;
ahost = buf;
- if (strlen(ahost) > MAXHOSTNAMELEN)
+ if (strlen(ahost) >= MAXHOSTNAMELEN)
continue;
/*