From 248cd24e69085a1d401bd95bbcc1666e892a337c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 14 Jul 2026 12:13:20 -0400 Subject: [PATCH] MT#55283 ensure null termination Change-Id: I15c8d0bf2b30236888131aa51a7b4b2f2641c339 (cherry picked from commit c4603dc3f37c391b48127107883b064606ed407e) --- kernel-module/nft_rtpengine.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel-module/nft_rtpengine.c b/kernel-module/nft_rtpengine.c index a12b264e5..6ad67df64 100644 --- a/kernel-module/nft_rtpengine.c +++ b/kernel-module/nft_rtpengine.c @@ -3011,6 +3011,8 @@ static ssize_t proc_main_control_write(struct file *file, const char __user *buf if (copy_from_user(&b, buf, buflen)) return -EFAULT; + b[buflen] = '\0'; + if (!strncmp(b, "add ", 4)) { id = simple_strtoul(b + 4, &endp, 10); if (endp == b + 4)