From 11ae4cb2d47596ed150ad5f231a2f40e89e5e940 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 28 Apr 2014 21:39:57 -0500 Subject: [PATCH] Revert "read_wim_lookup_table(): Make sure all resources get validated" This reverts commit dfba747e4324c0922f58ec03a84eb9c0b03f8f66. --- src/lookup_table.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lookup_table.c b/src/lookup_table.c index d42826dd..8c394f70 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -811,10 +811,10 @@ read_wim_lookup_table(WIMStruct *wim) * wimlib does not currently allow create WIMs with multiple * packed resources, as to remain compatible with WIMGAPI.) */ - if (likely(!(reshdr.flags & WIM_RESHDR_FLAG_PACKED_STREAMS)) - || !cur_rspec - || (reshdr.uncompressed_size == WIM_PACK_MAGIC_NUMBER && - cur_rspec->size_in_wim != 0)) + if (likely(!cur_rspec) || + !(reshdr.flags & WIM_RESHDR_FLAG_PACKED_STREAMS) || + (reshdr.uncompressed_size == WIM_PACK_MAGIC_NUMBER && + cur_rspec->size_in_wim != 0)) { /* Finish previous resource (if existent) */ if (cur_rspec) { @@ -974,6 +974,7 @@ read_wim_lookup_table(WIMStruct *wim) cur_entry->offset_in_res = 0; cur_entry->size = reshdr.uncompressed_size; cur_entry->flags = reshdr.flags; + cur_rspec = NULL; } continue; -- 2.43.0