Commit Graph

199 Commits

Author SHA1 Message Date
Xiang Xiao f679a939d3 Correct dummy filetime() prototype in minizip.c.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-03 11:02:39 -07:00
Mark Adler b3f23f7fb7 Match sign of printf directive to sign of argument in testzlib. 2023-07-29 23:58:11 -07:00
Mark Adler dcd0d86b9e Match sign of printf directive to sign of argument in minizip. 2023-07-29 23:55:48 -07:00
Mark Adler 3061e5013c Fix logic error in minizip argument processing. 2023-07-29 23:51:22 -07:00
Dimitri Papadopoulos 379bbda363 Fix typos found by codespell in minizip 2023-07-29 23:44:25 -07:00
Mark Adler e0bd0ad6e4 Fix reading disk number start on zip64 files in minizip. 2023-07-29 23:34:26 -07:00
Gilles Vollant 7b28ecc89d Remove duplicated code #806 2023-07-29 23:20:12 -07:00
RedworkDE f209ca7be7 minizip: Fix being unable to open empty zip file 2023-07-29 23:13:45 -07:00
Mark Adler 05527a1b1e Fix cast in minizip's ioapi.c for Windows. 2023-04-17 14:35:40 -07:00
Mark Adler 66588683b3 Remove use of OF() from contrib/untgz and render it compilable. 2023-04-15 22:56:43 -07:00
Mark Adler bf2578be2d Remove K&R function definitions from contrib/minizip. 2023-04-15 22:56:37 -07:00
Mark Adler c4aa356742 Remove K&R function definitions from infback9. 2023-04-15 21:18:52 -07:00
Mark Adler 41fda48fc2 Change version number on develop branch to 1.2.13.1. 2022-10-15 09:02:21 -07:00
Mark Adler 04f42ceca4 zlib 1.2.13 2022-10-12 22:06:55 -07:00
Mark Adler 40c5a9bc06 Find other BSD's without *64 functions in contrib/minizip/ioapi.h. 2022-10-10 02:39:33 -07:00
Mark Adler 2bb4961990 Avoid C89 warning in contrib/minizip/crypt.h. 2022-10-10 01:01:38 -07:00
Mark Adler e61ff990c0 Comment out unused code in contrib/minizip/minizip.c. 2022-10-09 21:26:39 -07:00
Mark Adler 4572dfbe99 Remove some harmless semicolons in minizip. 2022-10-06 20:43:19 -07:00
Mark Adler 138c93cffb Security and warning fixes for minizip. [gvollant]
Remove unused code and unnecessary test for free().
2022-10-06 20:43:18 -07:00
Mark Adler 9b291c9f01 Fix incorrect cast in minizip's ioapi.c. 2022-10-06 20:43:18 -07:00
Mark Adler 2d283adfee Fix c89 compatibility in minizip's ioapi.c. [gvollant] 2022-10-06 20:43:18 -07:00
Mark Adler d0704a8201 Remove deleted assembler code references.
The code was removed, but the builds that used the code were not
updated. This fixes that. Thanks to Adenilson and toxieainc for
the patches.
2022-10-06 20:43:09 -07:00
Mark Adler 59b948acee Fix typo in contrib readme. 2022-08-28 13:13:17 -07:00
Mark Adler 5752b171fd Fix some typos.
No code changes.
2022-08-23 15:35:13 -07:00
Mark Adler ce12773790 Fix compile with Windows 10 SDK. (gvollant) 2022-03-28 18:46:59 -07:00
Mark Adler a4c17581d8 Change version number on develop branch to 1.2.12.1. 2022-03-27 18:07:49 -07:00
Mark Adler 21767c654d zlib 1.2.12 2022-03-27 16:05:02 -07:00
Mark Adler 2014a993ad Clean up minizip to reduce warnings for testing.
Also fix Makefile test target and permit added compile options.
2022-01-01 14:55:47 -08:00
Mark Adler 58ca4e57ce Fix unztell64() in minizip to work past 4GB. (Daniël Hörchner)
The issue is that unztell64() does not return the correct value if
the position in the current file (in the ZIP archive) is beyond 4
GB. The cause is that unzReadCurrentFile() does not account for
pfile_in_zip_read_info->stream.total_out at line 1854 of unzip.c
wrapping around (it is a 32-bit variable). So, on line 1860
uTotalOutAfter can be *less* than uTotalOutBefore, propagating the
wraparound to uOutThis, which in turn is added to
pfile_in_zip_read_info->total_out_64. That has the effect of
subtracting 4 GB.
2022-01-01 12:09:30 -08:00
Mark Adler b135d46eaf minizip warning fix if MAXU32 already defined. (gvollant) 2021-12-31 17:22:37 -08:00
Mark Adler c3f3043f7a Fix indentation in minizip's zip.c. 2021-07-08 09:32:18 -07:00
Mark Adler 0530dbcef9 Improve portability of contrib/minizip. 2021-02-10 15:03:22 -08:00
Mark Adler 506424c640 Correct typo in blast.c. 2021-01-17 21:50:08 -08:00
Mark Adler 288f108031 Remove old assembler code in which bugs have manifested.
In addition, there is not sufficient gain from the inflate
assembler code to warrant its inclusion.
2017-10-12 20:27:14 -07:00
Mark Adler 7d60b86782 Change version number to 1.2.11.1. 2017-01-15 22:46:03 -08:00
Mark Adler cacf7f1d4e zlib 1.2.11 2017-01-15 09:29:40 -08:00
Mark Adler c38a2603ce Delete user-specific Visual Studio project files. 2017-01-15 09:07:14 -08:00
Mark Adler 11ceaed751 Change version number to 1.2.10.1. 2017-01-15 09:07:08 -08:00
Mark Adler 4a090adef8 zlib 1.2.10 2017-01-02 18:21:29 -08:00
Mark Adler 20e472546e Change version number to zlib 1.2.9.1. 2017-01-01 22:24:17 -08:00
Mark Adler 6bdca5060d Fix some stray 1.2.8.1 version numbers. 2017-01-01 22:23:41 -08:00
Mark Adler 2fa463bacf zlib 1.2.9 2016-12-31 23:37:10 -08:00
Mark Adler 14e3194e1e Update Visual Studio project files (AraHaan). 2016-12-31 18:57:48 -08:00
Mark Adler d6f0da2fa3 Fix character encoding and link in contrib README. 2016-12-30 20:00:51 -08:00
Mark Adler 03614c56ad Fix some typos. 2016-10-30 08:49:01 -07:00
Mark Adler 70a8763b71 Fix typo in blast.c. 2016-07-10 11:43:17 -07:00
Mark Adler 799c87c0d8 Improve contrib/blast to return unused bytes. Fix the test code
to report the count of unused bytes at the end correctly.  Add the
ability to provide initial input to blast().
2013-08-24 10:36:32 -07:00
Mark Adler 89e335abb4 Fix contrib/minizip to permit unzipping with desktop API [Zouzou]. 2013-08-03 18:13:23 -07:00
Mark Adler ceeb615f46 Change version number to 1.2.8.1. 2013-05-02 23:12:54 -07:00
Mark Adler 5b5da45640 Fix mixed line endings in contrib/vstudio. 2013-04-28 17:22:27 -07:00
Mark Adler b4d802825a Clean up contrib/vstudio [Roß]. 2013-04-28 15:57:11 -07:00
Mark Adler 5481269e1f Update contrib/minizip/iowin32.c for Windows RT [Vollant]. 2013-04-28 15:57:11 -07:00
Mark Adler e8fee0ea7b Change version number to 1.2.8. 2013-04-28 15:57:10 -07:00
Mark Adler c714072020 Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc. 2013-04-13 19:33:28 -07:00
Mark Adler 388a285cb8 Change version number to 1.2.7.3. 2013-04-13 18:58:46 -07:00
Mark Adler 8a93f49c86 Change version number to 1.2.7.2. 2013-04-13 08:08:57 -07:00
Enrico Weigelt, metux IT service 318a5e190e Add man pages for minizip and miniunzip. 2013-03-24 16:28:41 -07:00
Mark Adler 0aac8cf7c4 Clean up the addition of gzvprintf. 2013-03-23 23:47:15 -07:00
Mark Adler f0546c8e34 Clean up the addition of inflateGetDictionary. 2013-03-23 23:32:58 -07:00
Mark Adler dd5d0940e9 Add vc11 and vc12 build files to contrib/vstudio. 2013-03-22 17:38:37 -07:00
Fredrik Orderud 79a7058be4 Simplify contrib/vstudio/vc10 with 'd' suffix. 2013-02-23 23:44:00 -08:00
takacsd 63ba7582b8 Fix types in contrib/minizip to match result of get_crc_table(). 2013-02-23 23:32:30 -08:00
Jason Williams 00dfee0b2e Fix casting error in contrib/testzlib/testzlib.c. 2013-02-23 23:28:45 -08:00
Greg Domjan b116fb588d Add contrib/vstudio/vc10 pre-build step for static only.
Also correct typo for 64-bit debug build.
2013-02-23 22:56:32 -08:00
Mark Adler 10056909c0 Check for invalid code length codes in contrib/puff.
Without this fix, it would be possible to construct inputs to puff
that would cause it to segfault.
2013-01-21 10:17:45 -08:00
Mark Adler b6c5057ca1 Fix comparisons of differently signed integers in contrib/blast. 2012-10-24 22:50:23 -07:00
Mark Adler b8522e0264 Add note to contrib/blast to use binary mode in stdio. 2012-10-24 22:47:37 -07:00
Mark Adler 62d6112a79 Clean up the usage of z_const and respect const usage within zlib.
This patch allows zlib to compile cleanly with the -Wcast-qual gcc
warning enabled, but only if ZLIB_CONST is defined, which adds
const to next_in and msg in z_stream and in the in_func prototype.
A --const option is added to ./configure which adds -DZLIB_CONST
to the compile flags, and adds -Wcast-qual to the compile flags
when ZLIBGCCWARN is set in the environment.
2012-08-13 00:02:40 -07:00
Mark Adler aef4174dd2 Remove unused variable in infback9.c. 2012-07-08 16:48:36 -07:00
Birunthan Mohanathas f51cc49c94 Fix comment typos in unzip.h and unzip.c. 2012-07-08 16:34:08 -07:00
Mark Adler dca9e1d6f3 Add inflateGetDictionary() function. 2012-05-26 23:25:35 -07:00
Mark Adler 2689b3cceb Change version number to 1.2.7.1. 2012-05-02 22:38:26 -07:00
jK ba04838a74 Fix contrib/minizip compilation in the MinGW environment. 2012-03-26 20:17:41 -07:00
Birunthan Mohanathas 11f4065ea9 Remove gzflags from zlibvc.def in vc9 and vc10. 2012-03-22 22:24:52 -07:00
Mark Adler dbe0bed739 Add gzopen_w() in Windows for wide character path names. 2012-03-16 20:53:09 -07:00
Mark Adler e3ba2a10ca Fix contrib/vstudio project link errors [Mohanathas]. 2012-03-04 09:46:25 -08:00
Mark Adler d81e7213b7 Restore gzgetc_ for backward compatibility with 1.2.6. 2012-02-18 14:15:17 -08:00
Mark Adler 455adc3029 Expunge gzgetc_ from configuration files. 2012-02-13 23:34:48 -08:00
Mark Adler 72e2c8f088 Change version number to 1.2.7. 2012-02-12 16:15:47 -08:00
Mark Adler fc68b60086 Minor cleanup in contrib/minizip/zip.c [Vollant]. 2012-02-04 10:14:13 -08:00
Mark Adler 55b8b5fec1 Put gzflags() functionality back in zutil.c.
gzflags() was put in gzwrite.c in order to be compiled exactly the
same as gzprintf(), so that it was guaranteed to return the correct
information.  However that causes a static linkage to zlib to bring
in many routines that are often not used.  All that is required to
duplicate the compilation environment of gzprintf() is to include
gzguts.h.  So that is now done in zutil.c to assure that the correct
flags are returned.
2012-02-01 23:25:34 -08:00
Mark Adler 7b3f71ba5f Change version number to 1.2.6.1. 2012-01-29 21:15:24 -08:00
Jonathan Nieder 32d8a5379e Add an --enable-demos option to contrib/minizip/configure.
This makes build-testing and installing the minizip/miniunzip programs
as simple as "autoreconf -if && ./configure --enable-demos && make &&
make install".  Without --enable-demos, the makefile will only build
and install the library, as before.  Helped by Mike Frysinger.

minizip/miniunzip were not intended to be general-purpose installed
utilities, but they can be useful from time to time as a lightweight
substitute for zip/unzip.  You can also use them to quickly test that
the library installation procedure worked.
2012-01-21 17:15:48 -08:00
Jonathan Nieder f0cff24214 Add support for VPATH builds in contrib/minizip.
Instead of using relative paths directly, use paths relative to
top_srcdir and top_builddir to refer to source files and built files,
respectively.

Note that the toplevel zlib configure script still does not have any
special support for out-of-tree builds.  But now you can do

	(cd contrib/minizip && autoreconf -fis)

	mkdir -p BUILD/test
	cp *.c *.h *.in zlib.map configure zlib.3 BUILD
	cp test/*.c BUILD/test
	(cd BUILD && ./configure --shared)
	(cd BUILD && make)

	mkdir -p BUILD/contrib/minizip
	cd BUILD/contrib/minizip
	../../../contrib/minizip/configure
	make

While at it, move the include path and library path settings to
CPPFLAGS and LDFLAGS respectively instead of setting both in CFLAGS.
Thanks to Mike Frysinger for advice.
2012-01-21 12:56:57 -08:00
Jonathan Nieder 81015585d2 Add missing libs to minizip linker command.
Trying to build the minizip utility from contrib/minizip after an
autoreconf -f:

	libtool: link: gcc -g -O2 -o minizip minizip.o
	minizip.o: In function `getFileCrc':
	/tmp/zlib/contrib/minizip/minizip.c:211: undefined reference to `crc32'
	minizip.o: In function `main':
	/tmp/zlib/contrib/minizip/minizip.c:378: undefined reference to `zipOpen64'
	/tmp/zlib/contrib/minizip/minizip.c:451: undefined reference to `zipOpenNewFileInZip3_64'
	/tmp/zlib/contrib/minizip/minizip.c:502: undefined reference to `zipCloseFileInZip'
	/tmp/zlib/contrib/minizip/minizip.c:509: undefined reference to `zipClose'
	/tmp/zlib/contrib/minizip/minizip.c:485: undefined reference to `zipWriteInFileInZip'
	collect2: error: ld returned 1 exit status

The cause: contrib/minizip/Makefile.am does not specify that minizip
needs to be linked to libminizip.  With some linkers (e.g., GNU
binutils without --copy-dt-needed-entries), an indirect dependency
cannot be used to resolve symbols, so link to libz for crc32(), too.
2012-01-21 12:46:25 -08:00
Jonathan Nieder ad88c19baa Add -I../.. -L../.. to CFLAGS for minizip and miniunzip.
Trying to build miniunzip utility from contrib/minizip after an
autoreconf -f produces

	[...]
	In file included from minizip.c:61:0:
	zip.h:50:18: fatal error: zlib.h: No such file or directory

unless zlib is already installed.  Use AM_CFLAGS to set the include
path and library path to point to the just-build copy of zlib to
fix this.  (This was already done for libminizip but not the binaries
that use it before this patch.)
2012-01-21 12:45:38 -08:00
Mark Adler 17741efa02 Remove trailing space in contrib/minizip/minizip.c. 2012-01-21 12:00:26 -08:00
Mark Adler de6cb6fe5c Avoid some warnings in contrib/minizip [Vollant]. 2012-01-21 11:58:45 -08:00
Mark Adler 601b542a9d Protect for long name and extra fields in contrib/minizip [Vollant]. 2012-01-21 11:58:45 -08:00
Mark Adler 0458bbf2c0 Fix bug when compiling minizip with C++ [Vollant]. 2012-01-21 11:58:35 -08:00
Mark Adler 06c0e754ce Minor cleanup up contrib/minizip/unzip.c [Vollant]. 2012-01-21 11:49:31 -08:00
Mark Adler 9cdb49c96e Avoid warning for no encryption in contrib/minizip/zip.c [Vollant]. 2012-01-21 11:48:14 -08:00
Mark Adler 09bbe4c7f0 Make version explicit in contrib/minizip/configure.ac [Bosmans]. 2012-01-20 23:36:59 -08:00
Mark Adler 5c312df969 Fix compilation of contrib/minizip on FreeBSD [Márquez]. 2012-01-16 18:51:31 -08:00
Mark Adler e1f45fed54 Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes]. 2012-01-16 18:51:31 -08:00
Mark Adler 5a5dd2c793 Fix large-entry detection in minizip on 64-bit systems [Schiffer]. 2012-01-16 16:44:40 -08:00
Mark Adler eb33abcc55 Fix configure.ac for contrib/minizip [Schiffer]. 2012-01-16 16:44:40 -08:00
Mark Adler ce0ca940c2 Fix function numbers for gzgetc_ in zlibvc.def files. 2012-01-16 16:44:40 -08:00
Mark Adler c3799a2480 Update the Pascal interface in contrib/pascal. 2012-01-16 16:44:40 -08:00
Mark Adler 0ddfbd2346 Change version number to 1.2.6. 2012-01-16 16:44:29 -08:00