From: Ramasamy Kaliappan Date: Mon, 28 Jul 2025 04:31:03 +0000 (+0530) Subject: Increase buffer size to handle long freq_list entries in config X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ec6cade42c0fc9eeb86af207ac4170b652f97e37;p=thirdparty%2Fhostap.git 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 --- 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;