diff options
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index d0ad19e1f54d..26d16b9ffa81 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -15679,6 +15679,11 @@ static int __wlan_hdd_cfg80211_get_key(struct wiphy *wiphy, return -EINVAL; } + if (wlan_hdd_validate_session_id(pAdapter->sessionId)) { + hdd_err("Invalid session id: %d", pAdapter->sessionId); + return -EINVAL; + } + hdd_debug("Device_mode %s(%d)", hdd_device_mode_to_string(pAdapter->device_mode), pAdapter->device_mode); @@ -15690,6 +15695,11 @@ static int __wlan_hdd_cfg80211_get_key(struct wiphy *wiphy, return -EINVAL; } + if (pRoamProfile == NULL) { + hdd_err("Get roam profile failed!"); + return -EINVAL; + } + switch (pRoamProfile->EncryptionType.encryptionType[0]) { case eCSR_ENCRYPT_TYPE_NONE: params.cipher = IW_AUTH_CIPHER_NONE; |
