Thread (38 messages) 38 messages, 5 authors, 2017-04-30

Re: [PATCH v3 4/5] archive-zip: support archives bigger than 4GB

From: Peter Krefting <hidden>
Date: 2017-04-24 18:25:13

René Scharfe:
quoted hunk ↗ jump to hunk
@@ -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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help