1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 14:58:09 +00:00

bip32: Fix NULL dereference for EdDSA

This commit is contained in:
Saleem Rashid 2017-05-27 10:34:21 +01:00 committed by Pavol Rusnak
parent af06a997cb
commit dfdb4d2d76

View File

@ -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); const curve_info *info = get_curve_by_name(curve);
if (info == 0) { if (info == 0) {
failed = true; failed = true;
} else { } else if (info->params) {
bignum256 a; bignum256 a;
bn_read_be(private_key, &a); bn_read_be(private_key, &a);
if (bn_is_zero(&a)) { // == 0 if (bn_is_zero(&a)) { // == 0