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
1 changed files with 2 additions and 0 deletions

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;