summaryrefslogtreecommitdiff
path: root/ui/qt5/horizonwizard.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt5/horizonwizard.cc')
-rw-r--r--ui/qt5/horizonwizard.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc
index 7def8c8..7fefee5 100644
--- a/ui/qt5/horizonwizard.cc
+++ b/ui/qt5/horizonwizard.cc
@@ -384,10 +384,10 @@ char *encrypt_pw(const char *the_pw) {
RAND_bytes(rawsalt, 8);
QByteArray salt_ba(reinterpret_cast<char *>(rawsalt), 8);
- const char *salt = ("$6$" + salt_ba.toBase64(QByteArray::OmitTrailingEquals)
- .toStdString() + "$").c_str();
+ std::string salt("$6$" + salt_ba.toBase64(QByteArray::OmitTrailingEquals)
+ .toStdString() + "$");
char *result = new char[128];
- if(do_a_crypt(the_pw, salt, result) == nullptr) {
+ if(do_a_crypt(the_pw, salt.c_str(), result) == nullptr) {
delete[] result;
return nullptr;
}