diff options
author | Simon Warta <[email protected]> | 2015-07-09 10:53:49 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-07-09 10:53:49 +0200 |
commit | 92be92e6dd988b46c230e48710d8fa0040149123 (patch) | |
tree | f78d09a6dbd35b146a905daf0d3ee661d0c8acc1 | |
parent | efdb11eadd9d71378621f803dc99d71d1e2ba339 (diff) | |
parent | be64bdecf297a1041824265a5d33cd8dfe381bec (diff) |
Merge pull request #173 from webmaster128/avoid-iterator-pointer-mixing
Don't put pointers into vector iterator constructor in make_bcrypt
-rw-r--r-- | src/lib/passhash/bcrypt/bcrypt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/passhash/bcrypt/bcrypt.cpp b/src/lib/passhash/bcrypt/bcrypt.cpp index 3f6a68352..f7cf390e9 100644 --- a/src/lib/passhash/bcrypt/bcrypt.cpp +++ b/src/lib/passhash/bcrypt/bcrypt.cpp @@ -90,13 +90,13 @@ std::string make_bcrypt(const std::string& pass, const std::vector<byte>& salt, u16bit work_factor) { - const byte magic[24] = { + auto magic = std::vector<byte>{ 0x4F, 0x72, 0x70, 0x68, 0x65, 0x61, 0x6E, 0x42, 0x65, 0x68, 0x6F, 0x6C, 0x64, 0x65, 0x72, 0x53, 0x63, 0x72, 0x79, 0x44, 0x6F, 0x75, 0x62, 0x74 }; - std::vector<byte> ctext(magic, magic + sizeof(magic)); + std::vector<byte> ctext = magic; Blowfish blowfish; |