We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04111a6 commit 9250abbCopy full SHA for 9250abb
1 file changed
src/libwolfboot.c
@@ -191,7 +191,7 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
191
int sel;
192
uintptr_t off;
193
uint8_t *base;
194
- uint8_t* addrErase;
+ uint8_t* addrErase = 0;
195
uint32_t magic_off = 0;
196
uint32_t word_0;
197
uint32_t word_1;
@@ -205,8 +205,13 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
205
}
206
else {
207
base = (uint8_t *)PART_UPDATE_ENDFLAGS;
208
+#ifdef FLAGS_HOME
209
+ addrErase = (uint8_t *)WOLFBOOT_PARTITION_BOOT_ADDRESS +
210
+ WOLFBOOT_PARTITION_SIZE - WOLFBOOT_SECTOR_SIZE;
211
+#else
212
addrErase = (uint8_t *)WOLFBOOT_PARTITION_UPDATE_ADDRESS +
213
WOLFBOOT_PARTITION_SIZE - WOLFBOOT_SECTOR_SIZE;
214
+#endif
215
216
217
#ifdef EXT_ENCRYPTED
0 commit comments