diff options
author | Elliott Hughes <enh@google.com> | 2024-01-23 00:11:46 +0000 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2024-01-23 00:11:46 +0000 |
commit | 76b49a3a72593a27f314aff65b3ebf8db2352918 (patch) | |
tree | fb2e71bbb824db2702d1eb1f530c1f6142df081a /patches/0014-minizip-unzip-with-incorrect-size.patch | |
parent | 8dfcd22af5ffad0e16ec1023d0a189afd39c9b21 (diff) | |
parent | 63c0cec0344e6ba70f22bd690187088299baaa94 (diff) | |
download | zlib-76b49a3a72593a27f314aff65b3ebf8db2352918.tar.gz |
Upgrade zlib to 63c0cec0344e6ba70f22bd690187088299baaa94
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update zlib
For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md
Test: TreeHugger
Change-Id: I23d52b6301d2ed861155d66cdc9655f0eb06ba7d
Diffstat (limited to 'patches/0014-minizip-unzip-with-incorrect-size.patch')
-rw-r--r-- | patches/0014-minizip-unzip-with-incorrect-size.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/patches/0014-minizip-unzip-with-incorrect-size.patch b/patches/0014-minizip-unzip-with-incorrect-size.patch new file mode 100644 index 0000000..5ede561 --- /dev/null +++ b/patches/0014-minizip-unzip-with-incorrect-size.patch @@ -0,0 +1,34 @@ +commit 764f0715d75c8d49339aa73d0ee2feb75d63473f +Author: joaoe@opera.com <joaoe@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> +Date: Wed May 7 20:53:02 2014 +0000 + + Fixed uncompressing files with wrong uncompressed size set. + + A zip file carries some metadata for each archived file, including the total + uncompressed size. If that size was incorrect, therefore the compressed file + being different in size when unpacking, the minizip code would fail with a + CRC error. Every other zip utility handles these files, so should the minizip + code for safety sake. + + BUG=359516 + + Review URL: https://codereview.chromium.org/222243003 + + git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268940 0039d316-1c4b-4281-b951-d872f2087c98 + +diff --git a/third_party/zlib/contrib/minizip/unzip.c b/third_party/zlib/contrib/minizip/unzip.c +index ed763f89f1f87..82275d6c1775d 100644 +--- a/third_party/zlib/contrib/minizip/unzip.c ++++ b/third_party/zlib/contrib/minizip/unzip.c +@@ -1572,11 +1572,6 @@ extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, unsigned len) { + + pfile_in_zip_read_info->stream.avail_out = (uInt)len; + +- if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && +- (!(pfile_in_zip_read_info->raw))) +- pfile_in_zip_read_info->stream.avail_out = +- (uInt)pfile_in_zip_read_info->rest_read_uncompressed; +- + if ((len>pfile_in_zip_read_info->rest_read_compressed+ + pfile_in_zip_read_info->stream.avail_in) && + (pfile_in_zip_read_info->raw)) |