Post
Topic
Board Development & Technical Discussion
Re: [PULL] private key and wallet export/import
by
puddinpop
on 26/06/2011, 20:42:13 UTC
There's a crash caused by accessing an array element past the last one in base58.h, in the SecretToASecret function.
Code:
vch.insert(vch.end(), &vchSecret[0], &vchSecret[vchSecret.size()]);
vchSecret.size() is one past the last element, so it crashes here.

Since vchSecret is just a vector anyway, we can use this safer alternative:
Code:
vch.insert(vch.end(), vchSecret.begin(), vchSecret.end());