diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-07-05 00:07:55 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-07-05 00:07:55 -0500 |
commit | 61adaae76be7be859491c14f2f82570c11b762a4 (patch) | |
tree | e44e2cdb7cadb445f1fff158d8a23e4721c2c792 /ui | |
parent | c1a91704745f4243809f82478ab943cb9f9d005f (diff) | |
download | horizon-61adaae76be7be859491c14f2f82570c11b762a4.tar.gz horizon-61adaae76be7be859491c14f2f82570c11b762a4.tar.bz2 horizon-61adaae76be7be859491c14f2f82570c11b762a4.tar.xz horizon-61adaae76be7be859491c14f2f82570c11b762a4.zip |
Qt UI: Handle salt material correctly
Found by Clang 13. We should have been doing it this way all along.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt5/horizonwizard.cc | 6 |
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; } |