1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-02 02:41:28 +00:00

nem: check for invalid network id

This commit is contained in:
Pavol Rusnak 2018-10-19 15:50:06 +02:00
parent d26f7e8a80
commit ae077971ec
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -33,7 +33,7 @@ const char *nem_validate_common(NEMTransactionCommon *common, bool inner) {
common->network = NEM_NETWORK_MAINNET;
}
if (nem_network_name(common->network) == NULL) {
if (common->network > 0xFF || nem_network_name(common->network) == NULL) {
return inner ? _("Invalid NEM network in inner transaction") : _("Invalid NEM network");
}