1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

lisk: check recipient_id length

This commit is contained in:
Pavol Rusnak 2018-10-19 14:47:38 +02:00
parent 29b2a66783
commit f55bcbab31
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -222,7 +222,7 @@ void lisk_sign_tx(const HDNode *node, LiskSignTx *msg, LiskSignedTx *resp)
}
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)
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') {