summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-08-06 13:39:24 -0400
committerIan Moffett <ian@osmora.org>2025-08-06 13:39:24 -0400
commit44f52365f1332c689c701d79e1f3cec00b0c6659 (patch)
tree559ae084f523ef5bf490ae049bf638ca0752e09e
parent32c7a023ae1077d7db942c25b1e8bcda2349d6a2 (diff)
kernel: vcache: Include '\0' in sysctl string
The strlen() function does not count the null terminator when measuring the length of the string and therefore a value of 1 must be added to do so. Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/kern/vfs_vcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_vcache.c b/sys/kern/vfs_vcache.c
index 25e244c..6c08caf 100644
--- a/sys/kern/vfs_vcache.c
+++ b/sys/kern/vfs_vcache.c
@@ -161,7 +161,7 @@ vfs_vcache_migrate(int newtype)
args.oldp = NULL;
args.oldlenp = NULL;
args.newp = sysctl_val;
- args.newlen = strlen(sysctl_val);
+ args.newlen = strlen(sysctl_val) + 1;
if ((retval = sysctl(&args)) != 0) {
return retval;