mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
Merge pull request #1352
d01f5c7
wallet2: fix illegal memory access removing newlines from password (moneromooo-monero)
This commit is contained in:
commit
570acdc686
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ boost::optional<tools::password_container> get_password(const boost::program_opt
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove line breaks the user might have inserted
|
// Remove line breaks the user might have inserted
|
||||||
password.erase(std::remove(password.begin() - 1, password.end(), '\n'), password.end());
|
password.erase(std::remove(password.end() - 1, password.end(), '\n'), password.end());
|
||||||
password.erase(std::remove(password.end() - 1, password.end(), '\r'), password.end());
|
password.erase(std::remove(password.end() - 1, password.end(), '\r'), password.end());
|
||||||
return {tools::password_container(std::move(password))};
|
return {tools::password_container(std::move(password))};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue