X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Flookup_table.c;h=3d66ca18246be543cb63037d34af60989a0cb1f8;hp=142e7e0472f046cb8708faca88e61451d9b28c62;hb=79b64b516e5bdb486832f88788362dbe9deb1b61;hpb=f9a65bc36b0c82a7c46feec9140129fd5110289c diff --git a/src/lookup_table.c b/src/lookup_table.c index 142e7e04..3d66ca18 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -332,8 +332,15 @@ int read_lookup_table(WIMStruct *w) goto out_free_cur_entry; } + /* Ordinarily, no two streams should share the same SHA1 message + * digest. However, this constraint can be broken for metadata + * resources--- two identical images will have the same metadata + * resource, but their lookup table entries are not shared. */ duplicate_entry = __lookup_resource(table, cur_entry->hash); - if (duplicate_entry) { + if (duplicate_entry + && !((duplicate_entry->resource_entry.flags & WIM_RESHDR_FLAG_METADATA) + && cur_entry->resource_entry.flags & WIM_RESHDR_FLAG_METADATA)) + { ERROR("The WIM lookup table contains two entries with the " "same SHA1 message digest!"); ERROR("The first entry is:");