Hi! Applying the upstream patch to the Debian unzip sources again allows it to uncompress bzip2 compressed ZIP archives.
-- \\// Peter - http://www.softwolves.pp.se/
Description: Fix bugs that incorrectly updated G.incnt. The update assumed a full buffer, which is not always full. This could result in a false overlapped element detection when a small deflate-compressed file was unzipped using an old zlib. This commit remedies that. . unzip (6.0-25+1) unstable; urgency=medium . * Fix bzip2 decompression. Author: Mark Adler <[email protected]> --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: <vendor|upstream|other>, <url of original patch> Bug: <url in upstream bugtracker> Bug-Debian: https://bugs.debian.org/<bugnumber> Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> Forwarded: <no|not-needed|url proving that it has been forwarded> Reviewed-By: <name and email of someone who approved the patch> Last-Update: 2020-07-30 --- unzip-6.0.orig/extract.c +++ unzip-6.0/extract.c @@ -3052,7 +3052,7 @@ __GDEF #endif G.inptr = (uch *)bstrm.next_in; - G.incnt = (G.inbuf + INBUFSIZ) - G.inptr; /* reset for other routines */ + G.incnt -= G.inptr - G.inbuf; /* reset for other routines */ uzbunzip_cleanup_exit: err = BZ2_bzDecompressEnd(&bstrm); --- unzip-6.0.orig/inflate.c +++ unzip-6.0/inflate.c @@ -700,7 +700,7 @@ int UZinflate(__G__ is_defl64) G.dstrm.total_out)); G.inptr = (uch *)G.dstrm.next_in; - G.incnt = (G.inbuf + INBUFSIZ) - G.inptr; /* reset for other routines */ + G.incnt -= G.inptr - G.inbuf; /* reset for other routines */ uzinflate_cleanup_exit: err = inflateReset(&G.dstrm);

