don't try to decode invalid encoded ext keys

This commit is contained in:
Jonas Schnelli 2015-07-23 21:05:00 +02:00 committed by Jack Grigg
parent 51878774bf
commit 4d1d95310f
No known key found for this signature in database
GPG Key ID: 6A6914DAFBEA00DA
1 changed files with 4 additions and 1 deletions

View File

@ -171,7 +171,10 @@ public:
K GetKey() {
K ret;
ret.Decode(&vchData[0]);
if (vchData.size() == Size) {
//if base58 encouded data not holds a ext key, return a !IsValid() key
ret.Decode(&vchData[0]);
}
return ret;
}