mirror of
https://github.com/termux/termux-packages.git
synced 2025-02-22 20:27:08 +00:00
24 lines
858 B
Diff
24 lines
858 B
Diff
From: Mark Adler <madler@alumni.caltech.edu>
|
|
Subject: Fix bug in UZbunzip2() that incorrectly updated G.incnt
|
|
Origin: https://github.com/madler/unzip/commit/5e2efcd633a4a1fb95a129a75508e7d769e767be
|
|
Bug-Debian: https://bugs.debian.org/963996
|
|
X-Debian-version: 6.0-26
|
|
|
|
Fix bug in UZbunzip2() 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
|
|
bzip2-compressed file was unzipped. This commit remedies that.
|
|
|
|
--- a/extract.c
|
|
+++ b/extract.c
|
|
@@ -3052,7 +3052,7 @@
|
|
#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);
|