Skip to content

Commit

Permalink
Replaced uint32_t with uintptr_t
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinux committed Apr 16, 2024
1 parent d8c651c commit 32b5b9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libwolfboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
#endif

/* check magic in case the sector is corrupt */
word_0 = *((uint32_t*)((uint32_t)base - sizeof(uint32_t)));
word_1 = *((uint32_t*)((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)));

if (word_0 == WOLFBOOT_MAGIC_TRAIL && word_1 != WOLFBOOT_MAGIC_TRAIL) {
sel = 0;
Expand Down

0 comments on commit 32b5b9e

Please sign in to comment.