From c6ca89a8507bd9310c0c92c180525989629fb7d4 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sat, 20 Dec 2014 00:49:14 +0100 Subject: [PATCH] simplify check in hdnode_from_xpub --- bip32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bip32.c b/bip32.c index ae4ffc5b2..6af1b8840 100644 --- a/bip32.c +++ b/bip32.c @@ -33,8 +33,7 @@ int hdnode_from_xpub(uint32_t depth, uint32_t fingerprint, uint32_t child_num, const uint8_t *chain_code, const uint8_t *public_key, HDNode *out) { - curve_point c; - if (!ecdsa_read_pubkey(public_key, &c)) { // invalid pubkey + if (public_key[0] != 0x02 && public_key[0] != 0x03) { // invalid pubkey return 0; } out->depth = depth;