aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update inflateBack() comments, since inflate() can be faster.Mark Adler2013-02-231-5/+6
|
* Fix serious but very rare decompression bug in inftrees.c.Mark Adler2013-02-181-4/+4
| | | | | | | | | | | | inftrees.c compared the number of used table entries to the maximum allowed value using >= instead of >. This patch fixes those to use >. The bug was discovered by Ignat Kolesnichenko of Yandex LC where they have run petabytes of data through zlib. Triggering the bug is apparently very rare, seeing as how it has been out there in the wild for almost three years before being discovered. The bug is instantiated only if the exact maximum number of decoding table entries, ENOUGH_DISTS or ENOUGH_LENS is used by the block being decoded, resulting in the false positive of overflowing the table.
* Check for invalid code length codes in contrib/puff.Mark Adler2013-01-213-6/+9
| | | | | Without this fix, it would be possible to construct inputs to puff that would cause it to segfault.
* Fix comparisons of differently signed integers in contrib/blast.Mark Adler2012-10-241-1/+2
|
* Add note to contrib/blast to use binary mode in stdio.Mark Adler2012-10-242-4/+9
|
* Check for input buffer malloc failure in examples/gzappend.c.Mark Adler2012-10-111-7/+10
|
* Fix bug in gzclose() when gzwrite() runs out of memory.Mark Adler2012-10-011-5/+6
| | | | | | If the deflateInit2() called for the first gzwrite() failed with a Z_MEM_ERROR, then a subsequent gzclose() would try to free an already freed pointer. This fixes that.
* Fix bug where gzopen(), gzclose() would write an empty file.Mark Adler2012-09-291-8/+7
| | | | | | | A gzopen() to write (mode "w") followed immediately by a gzclose() would output an empty zero-length file. What it should do is write an empty gzip file, with the gzip header, empty deflate content, and gzip trailer totalling 20 bytes. This fixes it to do that.
* Fix memory allocation error in examples/zran.c [Nor].Mark Adler2012-09-291-3/+8
|
* Fix unintialized value bug in gzputc() introduced by const patches.Mark Adler2012-08-241-8/+10
| | | | | | | | | | | Avoid the use of an uninitialized value when the write buffers have not been initialized. A recent change to avoid the use of strm-> next_in in order to resolve some const conflicts added the use of state->in in its place. This patch avoids the use of state->in when it is not initialized. Nothing bad would actually happen, since two variables set to the same unintialized value are subtracted. However valgrind was rightly complaining. So this fixes that.
* Avoid shift equal to bits in type (caused endless loop).Mark Adler2012-08-181-18/+21
| | | | | | | | | | | Also clean up comparisons between different types, and some odd indentation problems that showed up somehow. A new endless loop was introduced by the clang compiler, which apparently does odd things when the right operand of << is equal to or greater than the number of bits in the type. The C standard in fact states that the behavior of << is undefined in that case. The loop was rewritten to use single-bit shifts.
* Clean up examples/gzlog.[ch] comparisons of different types.Mark Adler2012-08-182-7/+9
|
* Clean up examples/gzjoin.c for z_const usage.Mark Adler2012-08-141-6/+7
|
* Fix example/gzappend.c for proper z_const usage.Mark Adler2012-08-141-4/+5
|
* Update examples/gun.c for proper z_const usage.Mark Adler2012-08-131-5/+6
|
* Clean up the usage of z_const and respect const usage within zlib.Mark Adler2012-08-1316-70/+76
| | | | | | | | | 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.
* Fix argument checks in gzlog_compress() and gzlog_write().Mark Adler2012-07-082-7/+8
|
* Remove unused variable in infback9.c.Mark Adler2012-07-081-2/+0
|
* Fix comment typos in unzip.h and unzip.c.Birunthan Mohanathas2012-07-082-7/+7
|
* Update copyright year in win32/zlib1.rc.Thomas Roß2012-07-061-1/+1
|
* Fix CMake compilation of static lib for MSVC2010 x64.Thomas Roß2012-07-061-4/+4
|
* Fix configure check for veracity of compiler error return codes.Mark Adler2012-06-091-58/+85
| | | | | | | | | | | | There were two problems before that this fixes. One was that the check for the compiler error return code preceded the determination of the compiler and its options. The other was that the checks for compiler and library characteristics could be fooled if the error options were set to reject K&R-style C. configure now aborts if the compiler produces a hard error on K&R-style C. In addition, aborts of configure are now consistent, and remove any temporary files.
* Delete "--version" file if created by "ar --version" [Richard G.].Mark Adler2012-06-091-1/+1
|
* Cleaner check for whether libtool is Apple or not on Darwin.Mark Adler2012-06-091-1/+1
|
* On Darwin, only use /usr/bin/libtool if libtool is not Apple.Mark Adler2012-06-091-1/+5
| | | | | | | | | The original change was to always use /usr/bin/libtool on Darwin, in order to avoid using a GNU libtool installed by the user in the path ahead of Apple's libtool. However someone might install a more recent Apple libtool ahead of /usr/bin/libtool. This commit checks to see if libtool is Apple, and uses /usr/bin/libtool if it isn't.
* Use _snprintf for snprintf under Microsoft C in test/minigzip.c.Mark Adler2012-06-031-0/+4
|
* Use _snprintf for snprinf in Microsoft C.Mark Adler2012-06-031-0/+8
| | | | | | | | | | | More than a decade later, Microsoft C does not support the C99 standard. It's good that _snprintf has a different name, since it does not guarantee that the result is null terminated, as does snprintf. However where _snprintf is used under Microsoft C, the destination string is assured to be long enough, so this will not be a problem. This occurs in two places, both in gzlib.c. Where sprintf functionality is needed by gzprintf, vsnprintf is used in the case of Microsoft C.
* Correct comment in deflate.h.Mark Adler2012-06-021-1/+1
|
* Add inflateGetDictionary() function.Mark Adler2012-05-2611-0/+59
|
* Fix bug in 'F' mode for gzopen().Mark Adler2012-05-221-0/+2
|
* Eliminate use of mktemp in Makefile (not always available).Mark Adler2012-05-201-4/+4
|
* Fix gzgetc undefine when Z_PREFIX set [Turk].Mark Adler2012-05-171-1/+5
|
* Avoid including stddef.h on Windows for Z_SOLO compile [Niessink].Mark Adler2012-05-033-3/+9
|
* Replace use of unsafe string functions with snprintf if available.Mark Adler2012-05-022-0/+29
| | | | | | | | | | | | This avoids warnings in OpenBSD that apparently can't be turned off whenever you link strcpy, strcat, or sprintf. When snprintf isn't available, the use of the "unsafe" string functions has always in fact been safe, since the lengths are all checked before those functions are called. We do not use strlcpy or strlcat, since they are not (yet) found on all systems. snprintf on the other hand is part of the C standard library and is very common.
* Change version number to 1.2.7.1.Mark Adler2012-05-0224-44/+47
|
* zlib 1.2.7v1.2.7Mark Adler2012-05-024-5/+50
|
* Add instructions to win32/Makefile.gcc for shared install [Torri].Mark Adler2012-05-021-0/+4
|
* Force the native libtool in Mac OS X to avoid GNU libtool [Beebe].Mark Adler2012-05-011-1/+1
|
* Fix the path to zlib.map in CMakeLists.txt.Daniel Snider2012-04-291-1/+1
|
* Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler].Mark Adler2012-04-291-1/+1
|
* Fix location of executable for finding a four-byte integer.Mark Adler2012-04-291-1/+1
|
* Fix type mismatch between get_crc_table() and crc_table.Mark Adler2012-04-297-47/+120
| | | | | | | | | | | | | crc_table is made using a four-byte integer (when that can be determined). However get_crc_table() returned a pointer to an unsigned long, which could be eight bytes. This fixes that by creating a new z_crc_t type for the crc_table. This type is also used for the BYFOUR crc calculations that depend on a four-byte type. The four-byte type can now be determined by ./configure, which also solves a problem where ./configure --solo would never use BYFOUR. No the Z_U4 #define indicates that four- byte integer was found either by ./configure or by zconf.h.
* Avoid race condition for parallel make (-j) running example.Mark Adler2012-04-221-9/+12
|
* Remove -R. from Solaris shared build (possible security issue).Mark Adler2012-04-221-1/+1
|
* Update ./configure for Solaris, support --64 [Mooney].Mark Adler2012-04-221-9/+22
|
* Add more comments to configure.Mark Adler2012-04-011-1/+33
|
* Fix contrib/minizip compilation in the MinGW environment.jK2012-03-262-2/+19
|
* Remove gzflags from zlibvc.def in vc9 and vc10.Birunthan Mohanathas2012-03-222-2/+0
|
* Attempt to convert the wchar_t path in gzopen_w() for errors.Mark Adler2012-03-181-3/+20
| | | | | | | The conversion to multi-byte will be locale-specific, but it's better than nothing and is only to provide more information in the error message returned by gz_error(). The conversion has no effect on what's opened.
* Fix syntax error in gzlib.c.Mark Adler2012-03-181-1/+1
|