[PATCH] fix initialize the variable before using it.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



seg0 and seg1 variables can have any initial value, but they may
cause bss to have a wrong configuration later on.

Signed-off-by: Baligh Gasmi <gasmibal@xxxxxxxxx>
---
 src/ap/hostapd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 6a9b07e86..d6e3e4ede 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -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) {
-- 
2.40.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux