From 54513769da0ee60f2ed3be19c650c3dbb8b7d462 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 1165506a6..3619c853c 100644 --- a/kernel-module/nft_rtpengine.c +++ b/kernel-module/nft_rtpengine.c @@ -2839,6 +2839,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)