We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7f2305d + 32b5b9e commit 625501aCopy full SHA for 625501a
src/libwolfboot.c
@@ -240,8 +240,8 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
240
#endif
241
242
/* check magic in case the sector is corrupt */
243
- word_0 = *((uint32_t*)(base - sizeof(uint32_t)));
244
- word_1 = *((uint32_t*)(base - WOLFBOOT_SECTOR_SIZE - sizeof(uint32_t)));
+ word_0 = *((uint32_t*)((uintptr_t)base - sizeof(uint32_t)));
+ word_1 = *((uint32_t*)((uintptr_t)base - WOLFBOOT_SECTOR_SIZE - sizeof(uint32_t)));
245
246
if (word_0 == WOLFBOOT_MAGIC_TRAIL && word_1 != WOLFBOOT_MAGIC_TRAIL) {
247
sel = 0;
0 commit comments