diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-17 20:43:58 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-17 20:43:58 +0000 |
| commit | d01f5c7f1f1fcf929fec95bd39054ebf449de36b (patch) | |
| tree | 2f58fe2962d1e5606c57896a69f2ec90eba69608 /src | |
| parent | dbf2ab56c54b8be3d0f704f067c9bff79e90ed7e (diff) | |
| download | monzero-core-d01f5c7f1f1fcf929fec95bd39054ebf449de36b.tar.gz monzero-core-d01f5c7f1f1fcf929fec95bd39054ebf449de36b.tar.xz monzero-core-d01f5c7f1f1fcf929fec95bd39054ebf449de36b.zip | |
wallet2: fix illegal memory access removing newlines from password
Diffstat (limited to 'src')
| -rw-r--r-- | src/wallet/wallet2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 15a134257..47666a868 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -191,7 +191,7 @@ boost::optional<tools::password_container> get_password(const boost::program_opt } // 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()); return {tools::password_container(std::move(password))}; } |
