mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-24 00:18:26 +00:00
fix(crypto): fix wrong input handling in mktable
[no changelog]
This commit is contained in:
parent
ebfaff7904
commit
7cd27cf1d6
@ -18,9 +18,13 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
const char *name = argv[1];
|
const char *name = argv[1];
|
||||||
const curve_info *info = get_curve_by_name(name);
|
const curve_info *info = get_curve_by_name(name);
|
||||||
|
if (info == 0) {
|
||||||
|
printf("Unknown curve '%s'\n", name);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
const ecdsa_curve *curve = info->params;
|
const ecdsa_curve *curve = info->params;
|
||||||
if (curve == 0) {
|
if (curve == 0) {
|
||||||
printf("Unknown curve '%s'\n", name);
|
printf("Unknown curve params");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user