0029-Handle-Microsoft-ZIP64-files-by-ignoring-invalid-Tot.patch (1010B)
1 From 94b2d0b50a3a231ef91319e8e633b7ea62f0e2db Mon Sep 17 00:00:00 2001 2 From: Roy Tam <roytam@gmail.com> 3 Date: Mon, 28 Apr 2025 12:57:34 -0700 4 Subject: [PATCH] Handle Microsoft ZIP64 files by ignoring invalid "Total 5 number of disks" field 6 7 --- 8 process.c | 2 +- 9 1 file changed, 1 insertion(+), 1 deletion(-) 10 11 diff --git a/process.c b/process.c 12 index a7d5b87..b385f1e 100644 13 --- a/process.c 14 +++ b/process.c 15 @@ -1281,7 +1281,7 @@ static int find_ecrec64(__G__ searchlen) /* return PK-class error */ 16 fprintf(stdout,"\nnumber of disks (ECR) %u, (ECLOC64) %lu\n", 17 G.ecrec.number_this_disk, ecloc64_total_disks); fflush(stdout); 18 #endif 19 - if ((G.ecrec.number_this_disk != 0xFFFF) && 20 + if ((G.ecrec.number_this_disk != 0xFFFF) && ecloc64_total_disks && 21 (G.ecrec.number_this_disk != ecloc64_total_disks - 1)) { 22 /* Note: For some unknown reason, the developers at PKWARE decided to 23 store the "zip64 total disks" value as a counter starting from 1, 24 -- 25 2.45.2 26