From 43dae6b3529249e7dd66b5a1ed1807c2b0f78da2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 22 Feb 2025 10:52:29 +0200 Subject: [PATCH] PASN: Use NULL instead of 0 as a pointer These function calls used 0 instead of the proper NULL as a pointer. Signed-off-by: Jouni Malinen --- src/pasn/pasn_initiator.c | 12 ++++++------ src/pasn/pasn_responder.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pasn/pasn_initiator.c b/src/pasn/pasn_initiator.c index 035ae8144..bee7e5805 100644 --- a/src/pasn/pasn_initiator.c +++ b/src/pasn/pasn_initiator.c @@ -44,7 +44,7 @@ int pasn_initiator_pmksa_cache_add(struct rsn_pmksa_cache *pmksa, size_t pmk_len, const u8 *pmkid) { if (pmksa_cache_add(pmksa, pmk, pmk_len, pmkid, NULL, 0, bssid, - own_addr, NULL, WPA_KEY_MGMT_SAE, 0)) + own_addr, NULL, WPA_KEY_MGMT_SAE, NULL)) return 0; return -1; } @@ -126,7 +126,7 @@ static struct wpabuf * wpas_pasn_wd_sae_commit(struct pasn_data *pasn) wpabuf_put_le16(buf, 1); wpabuf_put_le16(buf, WLAN_STATUS_SAE_HASH_TO_ELEMENT); - sae_write_commit(&pasn->sae, buf, NULL, 0); + sae_write_commit(&pasn->sae, buf, NULL, NULL); pasn->sae.state = SAE_COMMITTED; return buf; @@ -175,8 +175,8 @@ static int wpas_pasn_wd_sae_rx(struct pasn_data *pasn, struct wpabuf *wd) return -1; } - res = sae_parse_commit(&pasn->sae, data + 6, len - 6, NULL, 0, groups, - 1, NULL); + res = sae_parse_commit(&pasn->sae, data + 6, len - 6, NULL, NULL, + groups, 1, NULL); if (res != WLAN_STATUS_SUCCESS) { wpa_printf(MSG_DEBUG, "PASN: SAE failed parsing commit"); return -1; @@ -499,7 +499,7 @@ static int wpas_pasn_wd_fils_rx(struct pasn_data *pasn, struct wpabuf *wd) pasn->pmk_len, pasn->fils.erp_pmkid, NULL, 0, pasn->peer_addr, pasn->own_addr, NULL, - pasn->akmp, 0); + pasn->akmp, NULL); pasn->fils.completed = true; return 0; @@ -915,7 +915,7 @@ static int wpas_pasn_set_pmk(struct pasn_data *pasn, pasn->sae.pmkid, NULL, 0, pasn->peer_addr, pasn->own_addr, NULL, - pasn->akmp, 0); + pasn->akmp, NULL); return 0; } #endif /* CONFIG_SAE */ diff --git a/src/pasn/pasn_responder.c b/src/pasn/pasn_responder.c index 11f27e16f..b4137b470 100644 --- a/src/pasn/pasn_responder.c +++ b/src/pasn/pasn_responder.c @@ -153,7 +153,7 @@ static int pasn_wd_handle_sae_commit(struct pasn_data *pasn, return -1; } - res = sae_parse_commit(&pasn->sae, data + 6, buf_len - 6, NULL, 0, + res = sae_parse_commit(&pasn->sae, data + 6, buf_len - 6, NULL, NULL, groups, 0, NULL); if (res != WLAN_STATUS_SUCCESS) { wpa_printf(MSG_DEBUG, "PASN: Failed parsing SAE commit"); @@ -252,7 +252,7 @@ static struct wpabuf * pasn_get_sae_wd(struct pasn_data *pasn) wpabuf_put_le16(buf, WLAN_STATUS_SAE_HASH_TO_ELEMENT); /* Write the actual commit and update the length accordingly */ - sae_write_commit(&pasn->sae, buf, NULL, 0); + sae_write_commit(&pasn->sae, buf, NULL, NULL); len = wpabuf_len(buf); WPA_PUT_LE16(len_ptr, len - 2); -- 2.47.2