From 2c224efad8bb9d344e3a21c355f809fac249e90b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 04:45:40 +0000 Subject: [PATCH 1/4] Initial plan From 9f1310e583eb54e225e0d820f62c84c3a0b6e614 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 04:48:14 +0000 Subject: [PATCH 2/4] Refactor newline handling to follow codebase pattern Co-authored-by: veeraputhiran-thangavel <224542127+veeraputhiran-thangavel@users.noreply.github.com> --- source/firewall/firewall.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/firewall/firewall.c b/source/firewall/firewall.c index 4348d47e..809638b2 100644 --- a/source/firewall/firewall.c +++ b/source/firewall/firewall.c @@ -8978,9 +8978,13 @@ memset(buf, 0, sizeof(buf)); { if(count == 0) { + int len = strlen(buf); + if(len > 0 && buf[len-1] == '\n') + buf[len-1] = '\0'; + errno = 0; numDev = strtol(buf, &endptr, 10); - if (endptr == buf || (*endptr != '\0' && *endptr != '\n') || errno == ERANGE) + if (endptr == buf || *endptr != '\0' || errno == ERANGE) { FIREWALL_DEBUG("invalid data\n"); break; From 699633a224422f0508336a1f87ef67bcb337b402 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 04:49:44 +0000 Subject: [PATCH 3/4] Final update after code review and security scan Co-authored-by: veeraputhiran-thangavel <224542127+veeraputhiran-thangavel@users.noreply.github.com> --- _codeql_detected_source_root | 1 + 1 file changed, 1 insertion(+) create mode 120000 _codeql_detected_source_root diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 00000000..945c9b46 --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +. \ No newline at end of file From 6ad522c7111153d91f0b9db235a5159be49cc761 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 04:49:52 +0000 Subject: [PATCH 4/4] Remove CodeQL artifact from repo Co-authored-by: veeraputhiran-thangavel <224542127+veeraputhiran-thangavel@users.noreply.github.com> --- .gitignore | 1 + _codeql_detected_source_root | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 120000 _codeql_detected_source_root diff --git a/.gitignore b/.gitignore index bcb04bb4..d2cefc13 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ missing Makefile Makefile.in stamp-h1 +_codeql_detected_source_root diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root deleted file mode 120000 index 945c9b46..00000000 --- a/_codeql_detected_source_root +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file