From ec6cade42c0fc9eeb86af207ac4170b652f97e37 Mon Sep 17 00:00:00 2001 From: Ramasamy Kaliappan Date: Mon, 28 Jul 2025 10:01:03 +0530 Subject: [PATCH] Increase buffer size to handle long freq_list entries in config When all common frequency bands (2.4 GHz, 5 GHz, and 6 GHz) are included in the freq_list configuration, parsing might fail due to the buffer being too small to accommodate the full list. This results in partial and incorrect frequency values being read, which might be subsequently rejected by the kernel as it cannot find a valid channel for the malformed frequency. Fix this by increasing the buffer size to a sufficient length in wpa_config_read(). Signed-off-by: Ramasamy Kaliappan Signed-off-by: Aditya Kumar Singh --- wpa_supplicant/config_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 885c7d8dc..c7b188cf2 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -359,7 +359,7 @@ struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp, bool ro) { FILE *f; - char buf[512], *pos; + char buf[1024], *pos; int errors = 0, line = 0; struct wpa_ssid *ssid, *tail, *head; struct wpa_cred *cred, *cred_tail, *cred_head; -- 2.47.3