From 430117dd16077f80dce3fa1e6b5e7454d4cd2bef Mon Sep 17 00:00:00 2001 From: mcudev <29890609+mcudev@users.noreply.github.com> Date: Sat, 30 Sep 2017 14:20:33 -0400 Subject: [PATCH] flash_otp_write: uninitialized variable --- embed/trezorhal/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embed/trezorhal/flash.c b/embed/trezorhal/flash.c index 1b5436b036..82173f4696 100644 --- a/embed/trezorhal/flash.c +++ b/embed/trezorhal/flash.c @@ -112,7 +112,7 @@ bool flash_otp_write(uint8_t block, uint8_t offset, const uint8_t *data, uint8_t if (!flash_unlock()) { return false; } - bool ret; + bool ret = false; for (uint8_t i = 0; i < datalen; i++) { ret = flash_write_byte(FLASH_OTP_BASE + block * FLASH_OTP_BLOCK_SIZE + offset + i, data[i]); if (!ret) {