From c28fd138c20d861fc985174cd0a766c54a100c59 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Mon, 31 Oct 2022 00:57:55 +0100 Subject: [PATCH] nvram: fix initialization bug. --- devices/common/nvram.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/common/nvram.cpp b/devices/common/nvram.cpp index 0186c0e..c582837 100644 --- a/devices/common/nvram.cpp +++ b/devices/common/nvram.cpp @@ -76,7 +76,7 @@ void NVram::init() { memcmp(sig, NVRAM_FILE_ID, sizeof(NVRAM_FILE_ID)) || data_size != this->ram_size || !f.read((char*)this->storage, this->ram_size)) { LOG_F(WARNING, "Could not restore NVRAM content from the given file."); - memset(this->storage, 0, sizeof(this->ram_size)); + memset(this->storage, 0, this->ram_size); } f.close();