diff mbox series

Interface List is using incorrect buffer size

Message ID CH3PR19MB8034BA571F05D8406512ABB8B94D2@CH3PR19MB8034.namprd19.prod.outlook.com
State Accepted
Headers show
Series Interface List is using incorrect buffer size | expand

Commit Message

Mujibur Rahiman K Feb. 15, 2024, 9:34 a.m. UTC
From fdcea883092d42c71a88ab692c8e9d2a5238a419 Mon Sep 17 00:00:00 2001
From: Mujibur Rahiman K <mujiburrahimank@maxlinear.com>
Date: Wed, 14 Feb 2024 15:33:25 +0530
Subject: [PATCH] Interface List is using incorrect buffer size
To: hostap@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@maxlinear.com
---
 hostapd/ctrl_iface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jouni Malinen March 3, 2024, 7:56 p.m. UTC | #1
On Thu, Feb 15, 2024 at 09:34:03AM +0000, Mujibur Rahiman K wrote:
> reply_size instead sizeof(buffer) should be provided to the call of function hostapd_global_ctrl_iface_interfaces

Thanks, applied.
diff mbox series

Patch

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 {