3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

eap-wsc: Zero a temporary buffer before freeing

This commit is contained in:
Andrew Zaborowski 2020-08-13 02:53:32 +02:00 committed by Denis Kenzior
parent 45d74ac1ed
commit 0480989a73

View File

@ -1157,11 +1157,13 @@ static bool load_hexencoded(struct l_settings *settings, const char *key,
return false;
if (decoded_len != len) {
explicit_bzero(decoded, decoded_len);
l_free(decoded);
return false;
}
memcpy(to, decoded, len);
explicit_bzero(decoded, decoded_len);
l_free(decoded);
return true;