]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Increase buffer size to handle long freq_list entries in config
authorRamasamy Kaliappan <ramasamy.kaliappan@oss.qualcomm.com>
Mon, 28 Jul 2025 04:31:03 +0000 (10:01 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 14 Aug 2025 09:40:17 +0000 (12:40 +0300)
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 <ramasamy.kaliappan@oss.qualcomm.com>
Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
wpa_supplicant/config_file.c

index 885c7d8dc7385055aaa6fd6e327dbc854ecd2c12..c7b188cf2112cb6fd8af66dfc3ee9e380312d03d 100644 (file)
@@ -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;