1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 03:18:09 +00:00

ethereum: clear local variables in layoutEthereumFee

This commit is contained in:
Pavol Rusnak 2019-02-16 15:54:28 +01:00
parent c7af39bf8d
commit fd46339f5c
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -377,6 +377,9 @@ static void layoutEthereumFee(const uint8_t *value, uint32_t value_len,
char tx_value[32];
char gas_value[32];
memzero(tx_value, sizeof(tx_value));
memzero(gas_value, sizeof(gas_value));
memzero(pad_val, sizeof(pad_val));
memcpy(pad_val + (32 - gas_price_len), gas_price, gas_price_len);
bn_read_be(pad_val, &val);