Add forgotten header_csum check to the new store

This commit is contained in:
Vitaliy Filippov
2026-05-11 14:59:08 +03:00
parent 0c5e6d4346
commit 87a5230798
+8
View File
@@ -153,6 +153,14 @@ resume_1:
);
exit(1);
}
uint32_t csum = hdr->header_csum;
hdr->header_csum = 0;
if (crc32c(0, hdr, sizeof(*hdr)) != csum)
{
printf("Metadata header is corrupt (checksum mismatch).\n");
exit(1);
}
hdr->header_csum = csum;
}
bs->heap->start_load(((blockstore_meta_header_v3_t *)bs->meta_superblock)->completed_lsn);
if (bs->dsk.inmemory_journal)