Skip to content

Commit ca2c7f6

Browse files
mattia-moffadanielinux
authored andcommitted
Check that diagnostics sectors fit at least one record
1 parent d15f4cb commit ca2c7f6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/libwolfboot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,7 @@ typedef char diag_record_size_check[
959959
typedef char diag_header_size_check[
960960
(sizeof(struct wolfBoot_diag_header) <= DIAG_HDR_SIZE) ? 1 : -1];
961961
typedef char diag_record_min_check[(DIAG_RECORD_SIZE >= 16U) ? 1 : -1];
962+
typedef char diag_slots_check[(DIAG_SLOTS_PER_SECTOR >= 1) ? 1 : -1];
962963

963964
static uint32_t RAMFUNCTION diag_crc32(const void *data, uint32_t len)
964965
{

0 commit comments

Comments
 (0)