summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorgnezdo <gnezdo@cvs.openbsd.org>2021-01-09 21:00:05 +0000
committergnezdo <gnezdo@cvs.openbsd.org>2021-01-09 21:00:05 +0000
commitbb649e18384a04f7dd9c4db61623aacf4f573c5e (patch)
treea9d5cba34a00ce5cd326957153c8ff4a578547d8 /sys/net
parent183507ba2ad93cc7ea16eb0f0ec54c581d065794 (diff)
Enforce range with sysctl_int_bounded in pipex_sysctl
OK millert@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pipex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pipex.c b/sys/net/pipex.c
index 7b1088fde74..84709c502ce 100644
--- a/sys/net/pipex.c
+++ b/sys/net/pipex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex.c,v 1.128 2021/01/02 13:15:15 mvs Exp $ */
+/* $OpenBSD: pipex.c,v 1.129 2021/01/09 21:00:04 gnezdo Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -2771,8 +2771,8 @@ pipex_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
case PIPEXCTL_ENABLE:
if (namelen != 1)
return (ENOTDIR);
- return (sysctl_int(oldp, oldlenp, newp, newlen,
- &pipex_enable));
+ return (sysctl_int_bounded(oldp, oldlenp, newp, newlen,
+ &pipex_enable, 0, 1));
default:
return (ENOPROTOOPT);
}