aboutsummaryrefslogtreecommitdiff
path: root/src/base58.h
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/base58.h
parent8d2af54eccda83bfe86bb14069ad54d0e4ba357c (diff)
downloadbitcoin-6f8b6d339bf6d6f7fe5a23180e668f7734755d91.tar.xz
don't try to decode invalid encoded ext keys
Diffstat (limited to 'src/base58.h')
-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;
}