X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Flookup_table.c;h=f24bf053e5d7e3fa2b4b47ea5e32c79483b40e52;hb=1c893605029270ae2b75ad1d90517aebdb78eb14;hp=4cae97ce0cbdc7a69b1e7e66a22dbd8bf1bb42dc;hpb=5d3d469e410dc5f4a28814ad231336fc174cba56;p=wimlib diff --git a/src/lookup_table.c b/src/lookup_table.c index 4cae97ce..f24bf053 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -721,6 +721,19 @@ read_wim_lookup_table(WIMStruct *wim) } wim_res_hdr_to_spec(&reshdr, wim, cur_rspec); + /* If this is a packed run, the current stream entry may + * specify a stream within the resource, and not the + * resource itself. Zero possibly irrelevant data until + * it is read for certain. (Note that the computation + * of 'back_to_back_pack' tests if 'size_in_wim' is + * nonzero to see if the resource info has been read; + * hence we need to set it to 0 here.) */ + if (reshdr.flags & WIM_RESHDR_FLAG_PACKED_STREAMS) { + cur_rspec->size_in_wim = 0; + cur_rspec->uncompressed_size = 0; + cur_rspec->offset_in_wim = 0; + } + if (prev_entry) lte_bind_wim_resource_spec(prev_entry, cur_rspec); }