Check wpa_auth_write_assoc_resp_owe() return value to keep static
analyzers happier. The code path where this could happen is not really
reachable due to the separate hapd->conf->own_ie_override check and
wpa_auth_write_assoc_resp_owe() returning NULL only in an error case in
the override path. Furthermore, clean up the pointer return value to use
a proper pointer (NULL vs. 0).
Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
owe_buf = wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf,
owe_buf_len, NULL, 0);
- if (sta->owe_ecdh) {
+ if (sta->owe_ecdh && owe_buf) {
struct wpabuf *pub;
pub = crypto_ecdh_get_pubkey(sta->owe_ecdh, 0);
#ifdef CONFIG_TESTING_OPTIONS
if (conf->own_ie_override_len) {
if (max_len < conf->own_ie_override_len)
- return 0;
+ return NULL;
wpa_hexdump(MSG_DEBUG, "WPA: Forced own IE(s) for testing",
conf->own_ie_override, conf->own_ie_override_len);
os_memcpy(pos, conf->own_ie_override,