summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sysctl.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-08-06 22:23:46 -0400
committerIan Moffett <ian@osmora.org>2025-08-06 22:23:46 -0400
commite21a6f72c66478d9a187d7da86aa152fd868d569 (patch)
treec57d194297cba04169ade1ac442eac4cd482a745 /sys/kern/kern_sysctl.c
parent123814b7bba93fa2db52339e8cdbb58607fd841d (diff)
kernel: sysctl: Be sure to set 'newlen' in args
Since we are approaching the point to where we'll need to set sysctl variables from userspace. It would be a wise idea to actually set the length of the new data. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r--sys/kern/kern_sysctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index f5d8bdc..ad90f1a 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -136,6 +136,7 @@ do_sysctl(struct sysctl_args *args)
new_args.oldp = oldp;
new_args.oldlenp = &oldlenp;
new_args.newp = newp;
+ new_args.newlen = args->newlen;
retval = sysctl(&new_args);
if (retval != 0) {