From 17488da0da4052ff2ad409fc20280db56720c211 Mon Sep 17 00:00:00 2001 From: orbisai0security Date: Sun, 28 Jun 2026 00:29:35 +0000 Subject: [PATCH] fix: V-001 security vulnerability Automated security fix generated by OrbisAI Security --- src/ctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ctl.c b/src/ctl.c index b94cf22a..03e6ee52 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -1920,10 +1920,10 @@ ctl_writeonly(void *oldp, size_t *oldlenp) { static inline int ctl_assured_write(void *dst, size_t dst_size, const void *newp, size_t newlen) { - if (newp == NULL || newlen != dst_size) { + if (newp == NULL || newlen > dst_size) { return EINVAL; } - memcpy(dst, newp, dst_size); + memcpy(dst, newp, newlen); return 0; }