Skip to content

Commit e6fefac

Browse files
de-nordicnordicjm
authored andcommitted
bootutil: Temporarly drop mem cleanup from boot_state_clear
Temporal removal of memset clear of boot_sector_clear that was causing boot to stop. The problem happens due to fill_rsp assigning pointer to header stored in cleared boot_state object, and the memset makes it inaccessible. Once change where header is copied to rsp the memset should be brought back as the boot_loader state should be completed before we pass further in execution. Fixes #2535 Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
1 parent 457be0c commit e6fefac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

boot/bootutil/src/bootutil_misc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ void boot_state_clear(struct boot_loader_state *state)
659659
boot_enc_drop(&state->enc[image][slot]);
660660
}
661661
}
662+
#else
663+
(void)state;
662664
#endif
663-
memset(state, 0, sizeof(struct boot_loader_state));
664665
}

0 commit comments

Comments
 (0)