[PATCH] Interface List is using incorrect buffer size

Mujibur Rahiman K mujiburrahimank at maxlinear.com
Thu Feb 15 01:34:03 PST 2024


>From fdcea883092d42c71a88ab692c8e9d2a5238a419 Mon Sep 17 00:00:00 2001
From: Mujibur Rahiman K <mujiburrahimank at maxlinear.com>
Date: Wed, 14 Feb 2024 15:33:25 +0530
Subject: [PATCH] Interface List is using incorrect buffer size
To: hostap at lists.infradead.org

reply_size instead sizeof(buffer) should be provided to the call of function hostapd_global_ctrl_iface_interfaces

Signed-Off-By : Mujibur Rahiman K mujiburrahimank at maxlinear.com
---
 hostapd/ctrl_iface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 015a67aea..a2cb15590 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -5050,7 +5050,7 @@ static void hostapd_global_ctrl_iface_receive(int sock, void *eloop_ctx,
 			reply_len = -1;
 	} else if (os_strncmp(buf, "INTERFACES", 10) == 0) {
 		reply_len = hostapd_global_ctrl_iface_interfaces(
-			interfaces, buf + 10, reply, sizeof(buffer));
+			interfaces, buf + 10, reply, reply_size);
 	} else if (os_strcmp(buf, "TERMINATE") == 0) {
 		eloop_terminate();
 	} else {
-- 
2.17.1



More information about the Hostap mailing list