diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2016-10-08 21:31:57 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2016-10-08 21:31:57 +0000 |
commit | 0058ca21b9b2dd044ad2923517783fc15df645c4 (patch) | |
tree | 4483a79a063d686dcfe17becdcd1028482663210 /sys | |
parent | 9fd2aead51c06857c0ac5dcaf25a2a2dfaba7d07 (diff) |
upon further review, port numbers go all the way up to ushort max
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index bd143c91202..f8c271036e2 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.315 2016/10/08 21:27:32 tedu Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.316 2016/10/08 21:31:56 tedu Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -611,7 +611,7 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, int port = dnsjackport; if ((error = sysctl_int(oldp, oldlenp, newp, newlen, &port))) return error; - if (port < 0 || port > SHRT_MAX) + if (port < 0 || port > USHRT_MAX) return EINVAL; dnsjackport = port; return 0; |