mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 06:48:16 +00:00
bip32: Fix NULL dereference for EdDSA
This commit is contained in:
parent
af06a997cb
commit
dfdb4d2d76
2
bip32.c
2
bip32.c
@ -94,7 +94,7 @@ int hdnode_from_xprv(uint32_t depth, uint32_t child_num, const uint8_t *chain_co
|
||||
const curve_info *info = get_curve_by_name(curve);
|
||||
if (info == 0) {
|
||||
failed = true;
|
||||
} else {
|
||||
} else if (info->params) {
|
||||
bignum256 a;
|
||||
bn_read_be(private_key, &a);
|
||||
if (bn_is_zero(&a)) { // == 0
|
||||
|
Loading…
Reference in New Issue
Block a user