]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Check end of new basic_rates int_array encoding correctly
authorJouni Malinen <j@w1.fi>
Sat, 18 Oct 2025 09:01:38 +0000 (12:01 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 18 Oct 2025 15:13:00 +0000 (18:13 +0300)
This place was missed when replacing the basic_rates encoding in hostapd
configuration to use the 0 terminated style.

Fixes: a3c1804d4112 ("Replace configuration int lists with int_arrays")
Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/sta_info.c

index efeb64d1d4fe041d56667547fc8d1221a5ef945e..bf48747c673b91a63555604ace3d9b491d517bcb 100644 (file)
@@ -884,7 +884,7 @@ struct sta_info * ap_sta_add(struct hostapd_data *hapd, const u8 *addr)
        for (i = 0; i < WLAN_SUPP_RATES_MAX; i++) {
                if (!hapd->iface->basic_rates)
                        break;
-               if (hapd->iface->basic_rates[i] < 0)
+               if (hapd->iface->basic_rates[i] <= 0)
                        break;
                sta->supported_rates[i] = hapd->iface->basic_rates[i] / 5;
        }