- struct wim_dentry *dentry;
- const struct wim_lookup_table_entry *metadata_lte;
- u64 metadata_len;
- struct hlist_head inode_list;
-
- metadata_lte = imd->metadata_lte;
- metadata_len = wim_resource_size(metadata_lte);
-
- DEBUG("Reading metadata resource: length = %"PRIu64", "
- "offset = %"PRIu64"", metadata_len,
- metadata_lte->resource_entry.offset);
-
- /* There is no way the metadata resource could possibly be less than (8
- * + WIM_DENTRY_DISK_SIZE) bytes, where the 8 is for security data (with
- * no security descriptors) and WIM_DENTRY_DISK_SIZE is for the root
- * dentry. */
- if (metadata_len < 8 + WIM_DENTRY_DISK_SIZE) {
- ERROR("Expected at least %u bytes for the metadata resource",
- 8 + WIM_DENTRY_DISK_SIZE);
- return WIMLIB_ERR_INVALID_RESOURCE_SIZE;
- }
-
- if (sizeof(size_t) < 8 && metadata_len > 0xffffffff) {
- ERROR("Metadata resource is too large (%"PRIu64" bytes",
- metadata_len);
- return WIMLIB_ERR_INVALID_RESOURCE_SIZE;
- }
-
- /* Allocate memory for the uncompressed metadata resource. */
- buf = MALLOC(metadata_len);