wallet2: fix illegal memory access removing newlines from password

release-v0.11.0.0
moneromooo-monero 8 years ago
parent dbf2ab56c5
commit d01f5c7f1f
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -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))};
}

Loading…
Cancel
Save