From dae38d7a9ff0382091d4e28de42e85034c40dbd9 Mon Sep 17 00:00:00 2001 From: veeraputhiran Date: Tue, 27 Jan 2026 10:09:57 +0000 Subject: [PATCH] RDKB-62660: Enable Business Gateway features in all the Platform Reason for change: root@Docsis-Gateway:~# cat /tmp/.pcmd 1 08:9d:f4:2d:54:33 root@Docsis-Gateway:~# When fgets reads the first line "1\n", the newline character is included in the buffer. The strtol function stops parsing at the newline, so endptr points to '\n', not '\0'. Validation check and fails because *endptr != '\0' is true (it's '\n'). Test Procedure: Login to xfinity app. Create a profile and assign a device Pause the assigned device using pause device option Risks: Low Signed-off-by:Veeraputhiran_Thangavel@comcast.com --- source/firewall/firewall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/firewall/firewall.c b/source/firewall/firewall.c index 3cfb7f9e..4348d47e 100644 --- a/source/firewall/firewall.c +++ b/source/firewall/firewall.c @@ -8980,7 +8980,7 @@ memset(buf, 0, sizeof(buf)); { errno = 0; numDev = strtol(buf, &endptr, 10); - if (endptr == buf || *endptr != '\0' || errno == ERANGE) + if (endptr == buf || (*endptr != '\0' && *endptr != '\n') || errno == ERANGE) { FIREWALL_DEBUG("invalid data\n"); break;