From 2ac62f0cac0bcf7ed088650ac58f723aaffa8bb9 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 29 Oct 2020 08:23:15 +0100 Subject: [PATCH] Fixed header size of ZF entries made for zisofs2 files compressed by libisofs --- libisofs/filters/zisofs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libisofs/filters/zisofs.c b/libisofs/filters/zisofs.c index 62a3b3e..600c2dc 100644 --- a/libisofs/filters/zisofs.c +++ b/libisofs/filters/zisofs.c @@ -1608,15 +1608,16 @@ int ziso_is_zisofs_stream(IsoStream *stream, int *stream_type, if (stream->class == &ziso_stream_compress_class && !(flag & 2)) { *stream_type = 1; cnstd = stream->data; - *header_size_div4 = 4; *uncompressed_size = cnstd->orig_size; *block_size_log2 = ziso_decide_bs_log2((off_t) *uncompressed_size); if (ziso_decide_v2_usage((off_t) *uncompressed_size)) { zisofs_algo[0] = 'P'; zisofs_algo[1] = 'Z'; + *header_size_div4 = 6; } else if (*uncompressed_size < (uint64_t) ISO_ZISOFS_V1_LIMIT) { zisofs_algo[0] = 'p'; zisofs_algo[1] = 'z'; + *header_size_div4 = 4; } else { return 0; }