logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

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. process.c | 2 +-
  8. 1 file changed, 1 insertion(+), 1 deletion(-)
  9. diff --git a/process.c b/process.c
  10. index a7d5b87..b385f1e 100644
  11. --- a/process.c
  12. +++ b/process.c
  13. @@ -1281,7 +1281,7 @@ static int find_ecrec64(__G__ searchlen) /* return PK-class error */
  14. fprintf(stdout,"\nnumber of disks (ECR) %u, (ECLOC64) %lu\n",
  15. G.ecrec.number_this_disk, ecloc64_total_disks); fflush(stdout);
  16. #endif
  17. - if ((G.ecrec.number_this_disk != 0xFFFF) &&
  18. + if ((G.ecrec.number_this_disk != 0xFFFF) && ecloc64_total_disks &&
  19. (G.ecrec.number_this_disk != ecloc64_total_disks - 1)) {
  20. /* Note: For some unknown reason, the developers at PKWARE decided to
  21. store the "zip64 total disks" value as a counter starting from 1,
  22. --
  23. 2.45.2