From fd46339f5cc2971cd202697503c81a04d4b402f3 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sat, 16 Feb 2019 15:54:28 +0100 Subject: [PATCH] ethereum: clear local variables in layoutEthereumFee --- firmware/ethereum.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/ethereum.c b/firmware/ethereum.c index 500102c39..c9de7c9cc 100644 --- a/firmware/ethereum.c +++ b/firmware/ethereum.c @@ -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);