1
0
mirror of https://github.com/biergaizi/codecrypt synced 2024-06-16 03:48:19 +00:00

keyring.cpp: fix std::vector access violation

Signed-off-by: Tom Li <tomli@tomli.me>
This commit is contained in:
Tom Li 2019-01-04 01:50:17 +08:00
parent 025a958a20
commit a5a1d6190c
No known key found for this signature in database
GPG Key ID: FAD3EB05E88E8D6D

@ -43,8 +43,8 @@ std::string keyring::get_keyid (const std::string&pubkey)
cube256hash hf;
std::vector<byte> tmp =
hf (std::vector<byte>
(&pubkey[0],
&pubkey[pubkey.length()]));
(pubkey.data(),
pubkey.data() + pubkey.length()));
r.resize (tmp.size() * 2, ' ');
for (size_t i = 0; i < tmp.size(); ++i) {