mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
lisk: check recipient_id length
This commit is contained in:
parent
29b2a66783
commit
f55bcbab31
@ -222,7 +222,7 @@ void lisk_sign_tx(const HDNode *node, LiskSignTx *msg, LiskSignedTx *resp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint64_t recipient_id = 0;
|
uint64_t recipient_id = 0;
|
||||||
if (msg->transaction.has_recipient_id) {
|
if (msg->transaction.has_recipient_id && msg->transaction.recipient_id[0] != 0) {
|
||||||
// parse integer from lisk address ("123L" -> 123)
|
// parse integer from lisk address ("123L" -> 123)
|
||||||
for (size_t i = 0; i < strlen(msg->transaction.recipient_id) - 1; i++) {
|
for (size_t i = 0; i < strlen(msg->transaction.recipient_id) - 1; i++) {
|
||||||
if (msg->transaction.recipient_id[i] < '0' || msg->transaction.recipient_id[i] > '9') {
|
if (msg->transaction.recipient_id[i] < '0' || msg->transaction.recipient_id[i] > '9') {
|
||||||
|
Loading…
Reference in New Issue
Block a user