From 04c6ab17e7f45264cc123d5e69e26a7027a3fe1a Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sat, 1 Oct 2016 23:44:00 -0700 Subject: [PATCH] Add warning for a zip file entry 4 GiB or larger. pigz currently will not generate a ZIP64 format .zip file if the input uncompressed or compressed lengths are greater than or equal to 4 GiB. This commit issues a warning in that instance that the resulting .zip file will be unusable. --- pigz.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pigz.c b/pigz.c index dd96534..ce01f8a 100644 --- a/pigz.c +++ b/pigz.c @@ -1048,6 +1048,8 @@ local void put_trailer(unsigned long ulen, unsigned long clen, PUT4L(tail + 8, clen); PUT4L(tail + 12, ulen); writen(g.outd, tail, 16); + if (clen > UINT32_MAX || ulen > UINT32_MAX) + complain("4 GiB or greater length: %s will be unusable", g.outf); /* write central file header */ PUT4L(tail, 0x02014b50UL); /* central header signature */