wpa_supplicant: ignore static analysis violations

This commit is contained in:
David Cermak 2020-03-27 19:17:36 +01:00
parent 2e28ab29c7
commit 62f9f42b54
4 changed files with 5 additions and 5 deletions

View File

@ -2036,7 +2036,7 @@ SM_STATE(WPA_PTK_GROUP, REKEYNEGOTIATING)
(!sm->Pair ? WPA_KEY_INFO_INSTALL : 0),
rsc, gsm->GNonce, kde, pos - kde, gsm->GN, 1);
if (sm->wpa == WPA_VERSION_WPA2)
os_free(kde);
os_free(kde); // NOLINT(clang-analyzer-unix.Malloc)
}

View File

@ -752,7 +752,7 @@ static int eap_peer_sm_init(void)
s_wpa2_data_lock = xSemaphoreCreateRecursiveMutex();
if (!s_wpa2_data_lock) {
wpa_printf(MSG_ERROR, "wpa2 eap_peer_sm_init: failed to alloc data lock");
wpa_printf(MSG_ERROR, "wpa2 eap_peer_sm_init: failed to alloc data lock"); // NOLINT(clang-analyzer-unix.Malloc)
return ESP_ERR_NO_MEM;
}

View File

@ -275,7 +275,7 @@ int wps_ap_priority_compar(const struct wpabuf *wps_a,
}
if (wps_a == NULL || wps_parse_msg(wps_a, attr_a) < 0)
return 1;
return 1; // NOLINT(clang-analyzer-unix.Malloc)
if (wps_b == NULL || wps_parse_msg(wps_b, attr_b) < 0)
return -1;

View File

@ -1644,11 +1644,11 @@ int wps_build_cred(struct wps_data *wps, struct wpabuf *msg)
return -1;
wps->new_psk_len--; /* remove newline */
while (wps->new_psk_len &&
wps->new_psk[wps->new_psk_len - 1] == '=')
wps->new_psk[wps->new_psk_len - 1] == '=') // NOLINT(clang-analyzer-unix.Malloc)
wps->new_psk_len--;
wpa_hexdump_ascii_key(MSG_DEBUG, "WPS: Generated passphrase",
wps->new_psk, wps->new_psk_len);
os_memcpy(wps->cred.key, wps->new_psk, wps->new_psk_len);
os_memcpy(wps->cred.key, wps->new_psk, wps->new_psk_len); // NOLINT(clang-analyzer-unix.Malloc)
wps->cred.key_len = wps->new_psk_len;
} else if (wps->use_psk_key && wps->wps->psk_set) {
char hex[65];