Clear static buffer returned by getpass()
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user