]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix INTERFACES command buffer size to allow more data
authorMujibur Rahiman K <mujiburrahimank@maxlinear.com>
Wed, 14 Feb 2024 10:03:25 +0000 (15:33 +0530)
committerJouni Malinen <j@w1.fi>
Sun, 3 Mar 2024 18:10:13 +0000 (20:10 +0200)
reply_size instead sizeof(buffer) should be provided to
hostapd_global_ctrl_iface_interfaces() when processing INTERFACES
commands. The previous use of sizeof(buffer) used a significantly
shorter limit (256 vs. 4096 bytes) for the output and this could have
resulted in unnecessary truncation of the output.

Fixes: 618f5d01b0cf ("hostapd: Add INTERFACES ctrl_iface command")
Signed-Off-By : Mujibur Rahiman K mujiburrahimank@maxlinear.com

hostapd/ctrl_iface.c

index 84d2e83e4eac6115103f59fdba8bc4a6f0098ee7..23ede0c5a7bd2f151b2d163b8cf9834bebce256b 100644 (file)
@@ -5359,7 +5359,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 {