From: Peter Krefting Date: Mon, 24 Apr 2017 18:24:53 GMT Subject: Re: [PATCH v3 4/5] archive-zip: support archives bigger than 4GB Message-ID: In-Reply-To: <02ddca3c-a11f-7c0c-947e-5ca87a62cdee@web.de> René Scharfe: > @@ -433,6 +446,11 @@ static int write_zip_entry(struct archiver_args *args, > free(deflated); > free(buffer); > > + if (offset > 0xffffffff) { > + zip64_dir_extra_payload_size += 8; > + zip_dir_extra_size += 2 + 2 + zip64_dir_extra_payload_size; > + } > + > strbuf_add_le(&zip_dir, 4, 0x02014b50); /* magic */ > strbuf_add_le(&zip_dir, 2, creator_version); > strbuf_add_le(&zip_dir, 2, 10); /* version */ This needs to be >=. The spec says that if the value is 0xffffffff, there should be a zip64 record with the actual size (even if it is 0xffffffff). Also set the version required to 45 (4.5) for any record that has zip64 fields. -- \\// Peter - http://www.softwolves.pp.se/