X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Flookup_table.c;h=a24cf68887d40a4246d3a29ad7639e29f67fb506;hp=f3d8c537d4237730d89ca24a56545f2c05225bdb;hb=19fd5bbc4f64cc8bf735f7c2c0bb864876998cf4;hpb=f5d26d6005ba759762bec8c7cd45a738e577a8a7 diff --git a/src/lookup_table.c b/src/lookup_table.c index f3d8c537..a24cf688 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -365,6 +365,8 @@ struct wim_lookup_table_entry_disk { u8 hash[SHA1_HASH_SIZE]; } _packed_attribute; +#define WIM_LOOKUP_TABLE_ENTRY_DISK_SIZE 50 + /* * Reads the lookup table from a WIM file. * @@ -382,6 +384,10 @@ read_lookup_table(WIMStruct *w) struct wim_lookup_table_entry_disk table_buf[BUFFER_SIZE / sizeof(struct wim_lookup_table_entry_disk)] _aligned_attribute(8); + + BUILD_BUG_ON(sizeof(struct wim_lookup_table_entry_disk) != + WIM_LOOKUP_TABLE_ENTRY_DISK_SIZE); + off_t offset; size_t buf_entries_remaining; const struct wim_lookup_table_entry_disk *disk_entry;