]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Initialize the variables before using it in channel update
authorBaligh Gasmi <gasmibal@gmail.com>
Fri, 12 Jan 2024 09:46:41 +0000 (10:46 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 14 Jan 2024 19:13:24 +0000 (21:13 +0200)
seg0 and seg1 variables can have any initial value, but they may cause
the BSS to have a wrong configuration later on in cases where the
separate center frequencies are not set.

Signed-off-by: Baligh Gasmi <gasmibal@gmail.com>
src/ap/hostapd.c

index 6a9b07e864308f9e3e5eae65ab1bc13d2255ad95..d6e3e4ede0eb291a9b33709600948f7671d6e0fa 100644 (file)
@@ -3831,7 +3831,7 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
                                      struct hostapd_freq_params *old_params)
 {
        int channel;
-       u8 seg0, seg1;
+       u8 seg0 = 0, seg1 = 0;
        struct hostapd_hw_modes *mode;
 
        if (!params->channel) {