mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-25 10:32:19 +03:00
prompt: zero password memory after running the command to be slightly more secure
This commit is contained in:
parent
c82b5bd016
commit
66a40a37cd
@ -1585,7 +1585,11 @@ const CommandDesc prompt_cmd = {
|
||||
CommandManager::instance().execute(command, context, shell_context);
|
||||
|
||||
if (password)
|
||||
{
|
||||
const String& str = RegisterManager::instance()[reg].values(context)[0];
|
||||
memset(const_cast<String&>(str).data(), 0, (int)str.length());
|
||||
RegisterManager::instance()[reg] = ConstArrayView<String>("");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user