]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_cli: Increase event buffer size to 4096 bytes
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 26 Sep 2014 12:26:43 +0000 (15:26 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 26 Sep 2014 12:45:53 +0000 (15:45 +0300)
Number of other buffers were already increased to this size, but the
buffer used for receiving unsolicited event messages from wpa_supplicant
(e.g., for wpa_cli action scripts) was still at the older 256 byte size.
This could result in some events getting truncated. Avoid this by using
the same 4096 byte buffer size here as in the other places receiving
messages from wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/wpa_cli.c

index 3b48c93392d49f7682b8c530b62cb88bcb473c2d..d380626b76f31cf83e2c6435907fef66a3c02623 100644 (file)
@@ -3385,7 +3385,7 @@ static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl, int action_monitor)
                return;
        }
        while (wpa_ctrl_pending(ctrl) > 0) {
-               char buf[256];
+               char buf[4096];
                size_t len = sizeof(buf) - 1;
                if (wpa_ctrl_recv(ctrl, buf, &len) == 0) {
                        buf[len] = '\0';