| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,19 +1,22 @@ | |||
| 1 | - version 1.2.12, March 27th, 2022 | ||
| 1 | + Copyright notice: | ||
| 2 | 2 | ||
| 3 | - Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler | ||
| 3 | + (C) 1995-2026 Jean-loup Gailly and Mark Adler | ||
| 4 | 4 | ||
| 5 | - This software is provided 'as-is', without any express or implied | ||
| 6 | - warranty. In no event will the authors be held liable for any damages | ||
| 7 | - arising from the use of this software. | ||
| 5 | + This software is provided 'as-is', without any express or implied | ||
| 6 | + warranty. In no event will the authors be held liable for any damages | ||
| 7 | + arising from the use of this software. | ||
| 8 | 8 | ||
| 9 | - Permission is granted to anyone to use this software for any purpose, | ||
| 10 | - including commercial applications, and to alter it and redistribute it | ||
| 11 | - freely, subject to the following restrictions: | ||
| 9 | + Permission is granted to anyone to use this software for any purpose, | ||
| 10 | + including commercial applications, and to alter it and redistribute it | ||
| 11 | + freely, subject to the following restrictions: | ||
| 12 | 12 | ||
| 13 | - 1. The origin of this software must not be misrepresented; you must not | ||
| 14 | - claim that you wrote the original software. If you use this software | ||
| 15 | - in a product, an acknowledgment in the product documentation would be | ||
| 16 | - appreciated but is not required. | ||
| 17 | - 2. Altered source versions must be plainly marked as such, and must not be | ||
| 18 | - misrepresented as being the original software. | ||
| 19 | - 3. This notice may not be removed or altered from any source distribution. | ||
| 13 | + 1. The origin of this software must not be misrepresented; you must not | ||
| 14 | + claim that you wrote the original software. If you use this software | ||
| 15 | + in a product, an acknowledgment in the product documentation would be | ||
| 16 | + appreciated but is not required. | ||
| 17 | + 2. Altered source versions must be plainly marked as such, and must not be | ||
| 18 | + misrepresented as being the original software. | ||
| 19 | + 3. This notice may not be removed or altered from any source distribution. | ||
| 20 | + | ||
| 21 | + Jean-loup Gailly Mark Adler | ||
| 22 | + jloup@gzip.org madler@alumni.caltech.edu | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,115 @@ | |||
| 1 | + ZLIB DATA COMPRESSION LIBRARY | ||
| 2 | + | ||
| 3 | + zlib 1.3.2.1 is a general purpose data compression library. All the code is | ||
| 4 | + thread safe (though see the FAQ for caveats). The data format used by the zlib | ||
| 5 | + library is described by RFCs (Request for Comments) 1950 to 1952 at | ||
| 6 | + https://datatracker.ietf.org/doc/html/rfc1950 (zlib format), rfc1951 (deflate | ||
| 7 | + format) and rfc1952 (gzip format). | ||
| 8 | + | ||
| 9 | + All functions of the compression library are documented in the file zlib.h | ||
| 10 | + (volunteer to write man pages welcome, contact zlib@gzip.org). A usage example | ||
| 11 | + of the library is given in the file test/example.c which also tests that | ||
| 12 | + the library is working correctly. Another example is given in the file | ||
| 13 | + test/minigzip.c. The compression library itself is composed of all source | ||
| 14 | + files in the root directory. | ||
| 15 | + | ||
| 16 | + To compile all files and run the test program, follow the instructions given at | ||
| 17 | + the top of Makefile.in. In short "./configure; make test", and if that goes | ||
| 18 | + well, "make install" should work for most flavors of Unix. For Windows, use | ||
| 19 | + one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use | ||
| 20 | + make_vms.com. | ||
| 21 | + | ||
| 22 | + Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant | ||
| 23 | + <info@winimage.com> for the Windows DLL version. The zlib home page is | ||
| 24 | + https://zlib.net/ . Before reporting a problem, please check this site to | ||
| 25 | + verify that you have the latest version of zlib; otherwise get the latest | ||
| 26 | + version and check whether the problem still exists or not. | ||
| 27 | + | ||
| 28 | + PLEASE read the zlib FAQ https://zlib.net/zlib_faq.html before asking for help. | ||
| 29 | + | ||
| 30 | + Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997 | ||
| 31 | + issue of Dr. Dobb's Journal; a copy of the article is available at | ||
| 32 | + https://zlib.net/nelson/ . | ||
| 33 | + | ||
| 34 | + The changes made in version 1.3.2.1 are documented in the file ChangeLog. | ||
| 35 | + | ||
| 36 | + Unsupported third party contributions are provided in directory contrib/ . | ||
| 37 | + | ||
| 38 | + zlib is available in Java using the java.util.zip package. Follow the API | ||
| 39 | + Documentation link at: https://docs.oracle.com/search/?q=java.util.zip . | ||
| 40 | + | ||
| 41 | + A Perl interface to zlib and bzip2 written by Paul Marquess <pmqs@cpan.org> | ||
| 42 | + can be found at https://github.com/pmqs/IO-Compress . | ||
| 43 | + | ||
| 44 | + A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is | ||
| 45 | + available in Python 1.5 and later versions, see | ||
| 46 | + https://docs.python.org/3/library/zlib.html . | ||
| 47 | + | ||
| 48 | + zlib is built into tcl: https://wiki.tcl-lang.org/page/zlib . | ||
| 49 | + | ||
| 50 | + An experimental package to read and write files in .zip format, written on top | ||
| 51 | + of zlib by Gilles Vollant <info@winimage.com>, is available in the | ||
| 52 | + contrib/minizip directory of zlib. | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + Notes for some targets: | ||
| 56 | + | ||
| 57 | + - For Windows DLL versions, please see win32/DLL_FAQ.txt | ||
| 58 | + | ||
| 59 | + - For 64-bit Irix, deflate.c must be compiled without any optimization. With | ||
| 60 | + -O, one libpng test fails. The test works in 32 bit mode (with the -n32 | ||
| 61 | + compiler flag). The compiler bug has been reported to SGI. | ||
| 62 | + | ||
| 63 | + - zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works | ||
| 64 | + when compiled with cc. | ||
| 65 | + | ||
| 66 | + - On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is | ||
| 67 | + necessary to get gzprintf working correctly. This is done by configure. | ||
| 68 | + | ||
| 69 | + - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with | ||
| 70 | + other compilers. Use "make test" to check your compiler. | ||
| 71 | + | ||
| 72 | + - For PalmOs, see https://palmzlib.sourceforge.net/ | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + Acknowledgments: | ||
| 76 | + | ||
| 77 | + The deflate format used by zlib was defined by Phil Katz. The deflate and | ||
| 78 | + zlib specifications were written by L. Peter Deutsch. Thanks to all the | ||
| 79 | + people who reported problems and suggested various improvements in zlib; they | ||
| 80 | + are too numerous to cite here. | ||
| 81 | + | ||
| 82 | + Copyright notice: | ||
| 83 | + | ||
| 84 | + (C) 1995-2026 Jean-loup Gailly and Mark Adler | ||
| 85 | + | ||
| 86 | + This software is provided 'as-is', without any express or implied | ||
| 87 | + warranty. In no event will the authors be held liable for any damages | ||
| 88 | + arising from the use of this software. | ||
| 89 | + | ||
| 90 | + Permission is granted to anyone to use this software for any purpose, | ||
| 91 | + including commercial applications, and to alter it and redistribute it | ||
| 92 | + freely, subject to the following restrictions: | ||
| 93 | + | ||
| 94 | + 1. The origin of this software must not be misrepresented; you must not | ||
| 95 | + claim that you wrote the original software. If you use this software | ||
| 96 | + in a product, an acknowledgment in the product documentation would be | ||
| 97 | + appreciated but is not required. | ||
| 98 | + 2. Altered source versions must be plainly marked as such, and must not be | ||
| 99 | + misrepresented as being the original software. | ||
| 100 | + 3. This notice may not be removed or altered from any source distribution. | ||
| 101 | + | ||
| 102 | + Jean-loup Gailly Mark Adler | ||
| 103 | + jloup@gzip.org madler@alumni.caltech.edu | ||
| 104 | + | ||
| 105 | + If you use the zlib library in a product, we would appreciate *not* receiving | ||
| 106 | + lengthy legal documents to sign. The sources are provided for free but without | ||
| 107 | + warranty of any kind. The library has been entirely written by Jean-loup | ||
| 108 | + Gailly and Mark Adler; it does not include third-party code. We make all | ||
| 109 | + contributions to and distributions of this project solely in our personal | ||
| 110 | + capacity, and are not conveying any rights to any intellectual property of | ||
| 111 | + any third parties. | ||
| 112 | + | ||
| 113 | + If you redistribute modified sources, we would appreciate that you include in | ||
| 114 | + the file ChangeLog history information documenting your changes. Please read | ||
| 115 | + the FAQ for more information on the distribution of modified source versions. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,10 @@ | |||
| 1 | 1 | Name: zlib | |
| 2 | 2 | Short Name: zlib | |
| 3 | 3 | URL: https://github.com/madler/zlib | |
| 4 | - Version: 1.3.1 | ||
| 5 | - Revision: 51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf | ||
| 4 | + Version: 1.3.2 | ||
| 5 | + Revision: 09a1572aa624e5ddb6c075dc013880de70b1b9b9 | ||
| 6 | 6 | Update Mechanism: Manual (https://crbug.com/422348588) | |
| 7 | - CPEPrefix: cpe:/a:zlib:zlib:1.3.1 | ||
| 7 | + CPEPrefix: cpe:/a:zlib:zlib:1.3.2 | ||
| 8 | 8 | Security Critical: yes | |
| 9 | 9 | Shipped: yes | |
| 10 | 10 | License: Zlib | |
@@ -33,6 +33,6 @@ Local Modifications: | |||
| 33 | 33 | - Plus the changes in 'patches' folder. | |
| 34 | 34 | - Code in contrib/ other than contrib/minizip was added to match zlib's | |
| 35 | 35 | contributor layout. | |
| 36 | - - In sync with 1.3.1 official release | ||
| 36 | + - In sync with 1.3.2 official release | ||
| 37 | 37 | - ZIP reader modified to allow for progress callbacks during extraction. | |
| 38 | 38 | - ZIP reader modified to add detection of AES encrypted content. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,16 +45,20 @@ | |||
| 45 | 45 | #define adler32_z Cr_z_adler32_z | |
| 46 | 46 | #define compress Cr_z_compress | |
| 47 | 47 | #define compress2 Cr_z_compress2 | |
| 48 | + #define compress_z Cr_z_compress_z | ||
| 49 | + #define compress2_z Cr_z_compress2_z | ||
| 48 | 50 | #define compressBound Cr_z_compressBound | |
| 51 | + #define compressBound_z Cr_z_compressBound_z | ||
| 49 | 52 | #define crc32 Cr_z_crc32 | |
| 50 | 53 | #define crc32_combine Cr_z_crc32_combine | |
| 51 | 54 | #define crc32_combine64 Cr_z_crc32_combine64 | |
| 52 | - #define crc32_combine_gen64 Cr_z_crc32_combine_gen64 | ||
| 53 | 55 | #define crc32_combine_gen Cr_z_crc32_combine_gen | |
| 56 | + #define crc32_combine_gen64 Cr_z_crc32_combine_gen64 | ||
| 54 | 57 | #define crc32_combine_op Cr_z_crc32_combine_op | |
| 55 | 58 | #define crc32_z Cr_z_crc32_z | |
| 56 | 59 | #define deflate Cr_z_deflate | |
| 57 | 60 | #define deflateBound Cr_z_deflateBound | |
| 61 | + #define deflateBound_z Cr_z_deflateBound_z | ||
| 58 | 62 | #define deflateCopy Cr_z_deflateCopy | |
| 59 | 63 | #define deflateEnd Cr_z_deflateEnd | |
| 60 | 64 | #define deflateGetDictionary Cr_z_deflateGetDictionary | |
@@ -70,6 +74,7 @@ | |||
| 70 | 74 | #define deflateSetDictionary Cr_z_deflateSetDictionary | |
| 71 | 75 | #define deflateSetHeader Cr_z_deflateSetHeader | |
| 72 | 76 | #define deflateTune Cr_z_deflateTune | |
| 77 | + #define deflateUsed Cr_z_deflateUsed | ||
| 73 | 78 | #define deflate_copyright Cr_z_deflate_copyright | |
| 74 | 79 | #define get_crc_table Cr_z_get_crc_table | |
| 75 | 80 | #define gz_error Cr_z_gz_error | |
@@ -135,8 +140,11 @@ | |||
| 135 | 140 | #define inflate_copyright Cr_z_inflate_copyright | |
| 136 | 141 | #define inflate_fast Cr_z_inflate_fast | |
| 137 | 142 | #define inflate_table Cr_z_inflate_table | |
| 143 | + #define inflate_fixed Cr_z_inflate_fixed | ||
| 138 | 144 | #define uncompress Cr_z_uncompress | |
| 139 | 145 | #define uncompress2 Cr_z_uncompress2 | |
| 146 | + #define uncompress_z Cr_z_uncompress_z | ||
| 147 | + #define uncompress2_z Cr_z_uncompress2_z | ||
| 140 | 148 | #define zError Cr_z_zError | |
| 141 | 149 | #define zcalloc Cr_z_zcalloc | |
| 142 | 150 | #define zcfree Cr_z_zcfree | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | /* compress.c -- compress a memory buffer | |
| 2 | - * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler | ||
| 2 | + * Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler | ||
| 3 | 3 | * For conditions of distribution and use, see copyright notice in zlib.h | |
| 4 | 4 | */ | |
| 5 | 5 | ||
@@ -18,13 +18,19 @@ | |||
| 18 | 18 | compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough | |
| 19 | 19 | memory, Z_BUF_ERROR if there was not enough room in the output buffer, | |
| 20 | 20 | Z_STREAM_ERROR if the level parameter is invalid. | |
| 21 | + | ||
| 22 | + The _z versions of the functions take size_t length arguments. | ||
| 21 | 23 | */ | |
| 22 | - int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source, | ||
| 23 | - uLong sourceLen, int level) { | ||
| 24 | + int ZEXPORT compress2_z(Bytef *dest, z_size_t *destLen, const Bytef *source, | ||
| 25 | + z_size_t sourceLen, int level) { | ||
| 24 | 26 | z_stream stream; | |
| 25 | 27 | int err; | |
| 26 | 28 | const uInt max = (uInt)-1; | |
| 27 | - uLong left; | ||
| 29 | + z_size_t left; | ||
| 30 | + | ||
| 31 | + if ((sourceLen > 0 && source == NULL) || | ||
| 32 | + destLen == NULL || (*destLen > 0 && dest == NULL)) | ||
| 33 | + return Z_STREAM_ERROR; | ||
| 28 | 34 | ||
| 29 | 35 | left = *destLen; | |
| 30 | 36 | *destLen = 0; | |
@@ -43,23 +49,36 @@ int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source, | |||
| 43 | 49 | ||
| 44 | 50 | do { | |
| 45 | 51 | if (stream.avail_out == 0) { | |
| 46 | - stream.avail_out = left > (uLong)max ? max : (uInt)left; | ||
| 52 | + stream.avail_out = left > (z_size_t)max ? max : (uInt)left; | ||
| 47 | 53 | left -= stream.avail_out; | |
| 48 | 54 | } | |
| 49 | 55 | if (stream.avail_in == 0) { | |
| 50 | - stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen; | ||
| 56 | + stream.avail_in = sourceLen > (z_size_t)max ? max : | ||
| 57 | + (uInt)sourceLen; | ||
| 51 | 58 | sourceLen -= stream.avail_in; | |
| 52 | 59 | } | |
| 53 | 60 | err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH); | |
| 54 | 61 | } while (err == Z_OK); | |
| 55 | 62 | ||
| 56 | - *destLen = stream.total_out; | ||
| 63 | + *destLen = (z_size_t)(stream.next_out - dest); | ||
| 57 | 64 | deflateEnd(&stream); | |
| 58 | 65 | return err == Z_STREAM_END ? Z_OK : err; | |
| 59 | 66 | } | |
| 60 | - | ||
| 67 | + int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source, | ||
| 68 | + uLong sourceLen, int level) { | ||
| 69 | + int ret; | ||
| 70 | + z_size_t got = *destLen; | ||
| 71 | + ret = compress2_z(dest, &got, source, sourceLen, level); | ||
| 72 | + *destLen = (uLong)got; | ||
| 73 | + return ret; | ||
| 74 | + } | ||
| 61 | 75 | /* =========================================================================== | |
| 62 | 76 | */ | |
| 77 | + int ZEXPORT compress_z(Bytef *dest, z_size_t *destLen, const Bytef *source, | ||
| 78 | + z_size_t sourceLen) { | ||
| 79 | + return compress2_z(dest, destLen, source, sourceLen, | ||
| 80 | + Z_DEFAULT_COMPRESSION); | ||
| 81 | + } | ||
| 63 | 82 | int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, | |
| 64 | 83 | uLong sourceLen) { | |
| 65 | 84 | return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); | |
@@ -69,9 +88,10 @@ int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, | |||
| 69 | 88 | If the default memLevel or windowBits for deflateInit() is changed, then | |
| 70 | 89 | this function needs to be updated. | |
| 71 | 90 | */ | |
| 72 | - uLong ZEXPORT compressBound(uLong sourceLen) { | ||
| 73 | - sourceLen = sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + | ||
| 74 | - (sourceLen >> 25) + 13; | ||
| 91 | + z_size_t ZEXPORT compressBound_z(z_size_t sourceLen) { | ||
| 92 | + z_size_t bound = sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + | ||
| 93 | + (sourceLen >> 25) + 13; | ||
| 94 | + | ||
| 75 | 95 | /* FIXME(cavalcantii): usage of CRC32 Castagnoli as a hash function | |
| 76 | 96 | * for the hash table of symbols used for compression has a side effect | |
| 77 | 97 | * where for compression level [4, 5] it will increase the output buffer size | |
@@ -80,6 +100,11 @@ uLong ZEXPORT compressBound(uLong sourceLen) { | |||
| 80 | 100 | * the expected output size by 0.8% (i.e. 8x more than the worst scenario). | |
| 81 | 101 | * See: http://crbug.com/990489 | |
| 82 | 102 | */ | |
| 83 | - sourceLen += sourceLen >> 7; // Equivalent to 1.0078125 | ||
| 84 | - return sourceLen; | ||
| 103 | + bound += bound >> 7; // Equivalent to 1.0078125 | ||
| 104 | + | ||
| 105 | + return bound < sourceLen ? (z_size_t)-1 : bound; | ||
| 106 | + } | ||
| 107 | + uLong ZEXPORT compressBound(uLong sourceLen) { | ||
| 108 | + z_size_t bound = compressBound_z(sourceLen); | ||
| 109 | + return (uLong)bound != bound ? (uLong)-1 : (uLong)bound; | ||
| 85 | 110 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,8 @@ | |||
| 1 | - CC?=cc | ||
| 2 | - CFLAGS := -O $(CFLAGS) -I../.. | ||
| 1 | + CPPFLAGS = -I../.. | ||
| 3 | 2 | ||
| 4 | 3 | UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a | |
| 5 | 4 | ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a | |
| 6 | 5 | ||
| 7 | - .c.o: | ||
| 8 | - $(CC) -c $(CFLAGS) $*.c | ||
| 9 | - | ||
| 10 | 6 | all: miniunz minizip | |
| 11 | 7 | ||
| 12 | 8 | miniunz.o: miniunz.c unzip.h iowin32.h | |
@@ -18,10 +14,10 @@ iowin32.o: iowin32.c iowin32.h ioapi.h | |||
| 18 | 14 | mztools.o: mztools.c unzip.h | |
| 19 | 15 | ||
| 20 | 16 | miniunz: $(UNZ_OBJS) | |
| 21 | - $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) | ||
| 17 | + ${CC} ${LDFLAGS} -o $@ $(UNZ_OBJS) | ||
| 22 | 18 | ||
| 23 | 19 | minizip: $(ZIP_OBJS) | |
| 24 | - $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) | ||
| 20 | + ${CC} ${LDFLAGS} -o $@ $(ZIP_OBJS) | ||
| 25 | 21 | ||
| 26 | 22 | test: miniunz minizip | |
| 27 | 23 | @rm -f test.* | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,8 @@ | |||
| 1 | 1 | Name: ZIP file API for reading file entries in a ZIP archive | |
| 2 | 2 | Short Name: minizip | |
| 3 | 3 | URL: https://github.com/madler/zlib/tree/master/contrib/minizip | |
| 4 | - Version: 1.3.1.1 | ||
| 5 | - Revision: ef24c4c7502169f016dcd2a26923dbaf3216748c | ||
| 4 | + Version: 1.3.2 | ||
| 5 | + Revision: 09a1572aa624e5ddb6c075dc013880de70b1b9b9 | ||
| 6 | 6 | Update Mechanism: Manual | |
| 7 | 7 | License: Zlib | |
| 8 | 8 | License File: //third_party/zlib/LICENSE | |
@@ -40,3 +40,6 @@ Local Modifications: | |||
| 40 | 40 | large CRX files). | |
| 41 | 41 | 0018-support-prefixed-zip64.patch | |
| 42 | 42 | ||
| 43 | + - Added stricter parsing for zip64 candidates to avoid an issue where a zip64 | ||
| 44 | + could be embedded in a non-zip64 zip. | ||
| 45 | + 0019-fix-zip64-in-zip.patch | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,9 +1,6 @@ | |||
| 1 | 1 | /* crypt.h -- base code for crypt/uncrypt ZIPfile | |
| 2 | 2 | ||
| 3 | - | ||
| 4 | - Version 1.01e, February 12th, 2005 | ||
| 5 | - | ||
| 6 | - Copyright (C) 1998-2005 Gilles Vollant | ||
| 3 | + Copyright (C) 1998-2026 Gilles Vollant | ||
| 7 | 4 | ||
| 8 | 5 | This code is a modified version of crypting code in Infozip distribution | |
| 9 | 6 | ||
@@ -23,7 +20,7 @@ | |||
| 23 | 20 | This code support the "Traditional PKWARE Encryption". | |
| 24 | 21 | ||
| 25 | 22 | The new AES encryption added on Zip format by Winzip (see the page | |
| 26 | - http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong | ||
| 23 | + https://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong | ||
| 27 | 24 | Encryption is not supported. | |
| 28 | 25 | */ | |
| 29 | 26 | ||
@@ -50,7 +47,7 @@ static int update_keys(unsigned long* pkeys, const z_crc_t* pcrc_32_tab, int c) | |||
| 50 | 47 | (*(pkeys+1)) += (*(pkeys+0)) & 0xff; | |
| 51 | 48 | (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; | |
| 52 | 49 | { | |
| 53 | - register int keyshift = (int)((*(pkeys+1)) >> 24); | ||
| 50 | + int keyshift = (int)((*(pkeys+1)) >> 24); | ||
| 54 | 51 | (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); | |
| 55 | 52 | } | |
| 56 | 53 | return c; | |
@@ -106,7 +103,7 @@ static unsigned crypthead(const char* passwd, /* password string */ | |||
| 106 | 103 | */ | |
| 107 | 104 | if (++calls == 1) | |
| 108 | 105 | { | |
| 109 | - srand((unsigned)(time(NULL) ^ ZCR_SEED2)); | ||
| 106 | + srand((unsigned)time(NULL) ^ ZCR_SEED2); | ||
| 110 | 107 | } | |
| 111 | 108 | init_keys(passwd, pkeys, pcrc_32_tab); | |
| 112 | 109 | for (n = 0; n < RAND_HEAD_LEN-2; n++) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments