qcacld-3.0: Initialize sap max number of peers

Currently callers are calling the wlan_mlme_get_sap_max_peers() API
to get the max number of peers without initializing the output
parameter.
In case of failure in wlan_mlme_get_sap_max_peers() API,
sap_max_num_peers can have uninitialized value which can lead to
undefined behavior.

To fix this issue, initialize the output parameter before calling
wlan_mlme_get_sap_max_peers()

CRs-Fixed: 3337315
Change-Id: I83ecaf80ccee7d92a66fe561c0a1a7bd409fd64c
Dieser Commit ist enthalten in:
Sachin Ahuja
2022-11-15 17:02:18 +05:30
committet von Madan Koyyalamudi
Ursprung c3b6c10ab4
Commit 6b6b2f4fde
3 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@@ -206,7 +206,7 @@ ucfg_twt_get_all_peer_session_params(struct wlan_objmgr_psoc *psoc_obj,
struct peer_mc_cp_stats *mc_cp_stats;
int num_twt_session = 0;
enum QDF_OPMODE opmode;
int sap_max_peer;
int sap_max_peer = 0;
if (!psoc_obj) {
cp_stats_err("psoc is NULL");

Datei anzeigen

@@ -6385,7 +6385,7 @@ void wlan_mlme_get_feature_info(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_features *mlme_feature_set)
{
uint32_t roam_triggers;
int sap_max_num_clients;
int sap_max_num_clients = 0;
bool is_enable_idle_roam = false, is_bss_load_enabled = false;
wlan_mlme_get_latency_enable(psoc,

Datei anzeigen

@@ -19238,7 +19238,7 @@ void wlan_hdd_set_mlo_wiphy_ext_feature(struct wiphy *wiphy,
*/
void wlan_hdd_update_wiphy(struct hdd_context *hdd_ctx)
{
int value;
int value = 0;
bool fils_enabled, mac_spoofing_enabled;
bool dfs_master_capable = true, is_oce_sta_enabled = false;
QDF_STATUS status;