diff options
Diffstat (limited to 'src/key.h')
-rw-r--r-- | src/key.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -172,6 +172,8 @@ struct CExtKey { { unsigned int len = ::ReadCompactSize(s); unsigned char code[BIP32_EXTKEY_SIZE]; + if (len != BIP32_EXTKEY_SIZE) + throw std::runtime_error("Invalid extended key size\n"); s.read((char *)&code[0], len); Decode(code); } |