aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-07-23 21:05:00 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-07-25 09:51:52 +0200
commit6f8b6d339bf6d6f7fe5a23180e668f7734755d91 (patch)
tree68fcf51545f5aa423d0a3e35ed451438d2545833 /src
parent8d2af54eccda83bfe86bb14069ad54d0e4ba357c (diff)
don't try to decode invalid encoded ext keys
Diffstat (limited to 'src')
-rw-r--r--src/base58.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/base58.h b/src/base58.h
index d535491bb0..90014b9496 100644
--- a/src/base58.h
+++ b/src/base58.h
@@ -146,7 +146,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;
}