Clear static buffer returned by getpass()

This commit is contained in:
Tobias Brunner
2021-10-04 11:30:03 +02:00
parent de442491d9
commit 128d054407
4 changed files with 5 additions and 2 deletions
+1
View File
@@ -112,6 +112,7 @@ static shared_key_t* callback_shared(private_cmd_creds_t *this,
*match_other = ID_MATCH_PERFECT;
}
shared = shared_key_create(type, chunk_clone(chunk_from_str(pwd)));
memwipe(pwd, strlen(pwd));
/* cache password in case it is required more than once */
this->creds->add_shared(this->creds, shared, NULL);
return shared->get_ref(shared);