From: Eric Biggers Date: Sat, 24 Oct 2015 19:31:24 +0000 (-0500) Subject: write.c: don't write integrity table if there is no blob table X-Git-Tag: v1.8.3~27 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=35a448862fb198323481044e0d820c7c631e4dab;hp=c0f97d52b487123a1a68a6a07fa0d9be81ee1f72 write.c: don't write integrity table if there is no blob table The following commands would produce an invalid integrity table: wimcapture empty empty.wim wimdelete delete empty.wim 1 --check --- diff --git a/src/write.c b/src/write.c index bc7b6ebd..9e396162 100644 --- a/src/write.c +++ b/src/write.c @@ -2388,7 +2388,9 @@ finish_write(WIMStruct *wim, int image, int write_flags, } /* Write integrity table if needed. */ - if (write_flags & WIMLIB_WRITE_FLAG_CHECK_INTEGRITY) { + if ((write_flags & WIMLIB_WRITE_FLAG_CHECK_INTEGRITY) && + wim->out_hdr.blob_table_reshdr.offset_in_wim != 0) + { if (write_flags & WIMLIB_WRITE_FLAG_NO_NEW_BLOBS) { /* The XML data we wrote may have overwritten part of * the old integrity table, so while calculating the new