forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1328099 - Update in-tree zlib to version 1.2.11. r=jrmuizel
- Loading branch information
Showing
24 changed files
with
1,668 additions
and
969 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,53 @@ | ||
|
||
ChangeLog file for zlib | ||
|
||
Changes in 1.2.11 (15 Jan 2017) | ||
- Fix deflate stored bug when pulling last block from window | ||
- Permit immediate deflateParams changes before any deflate input | ||
|
||
Changes in 1.2.10 (2 Jan 2017) | ||
- Avoid warnings on snprintf() return value | ||
- Fix bug in deflate_stored() for zero-length input | ||
- Fix bug in gzwrite.c that produced corrupt gzip files | ||
- Remove files to be installed before copying them in Makefile.in | ||
- Add warnings when compiling with assembler code | ||
|
||
Changes in 1.2.9 (31 Dec 2016) | ||
- Fix contrib/minizip to permit unzipping with desktop API [Zouzou] | ||
- Improve contrib/blast to return unused bytes | ||
- Assure that gzoffset() is correct when appending | ||
- Improve compress() and uncompress() to support large lengths | ||
- Fix bug in test/example.c where error code not saved | ||
- Remedy Coverity warning [Randers-Pehrson] | ||
- Improve speed of gzprintf() in transparent mode | ||
- Fix inflateInit2() bug when windowBits is 16 or 32 | ||
- Change DEBUG macro to ZLIB_DEBUG | ||
- Avoid uninitialized access by gzclose_w() | ||
- Allow building zlib outside of the source directory | ||
- Fix bug that accepted invalid zlib header when windowBits is zero | ||
- Fix gzseek() problem on MinGW due to buggy _lseeki64 there | ||
- Loop on write() calls in gzwrite.c in case of non-blocking I/O | ||
- Add --warn (-w) option to ./configure for more compiler warnings | ||
- Reject a window size of 256 bytes if not using the zlib wrapper | ||
- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE | ||
- Add --debug (-d) option to ./configure to define ZLIB_DEBUG | ||
- Fix bugs in creating a very large gzip header | ||
- Add uncompress2() function, which returns the input size used | ||
- Assure that deflateParams() will not switch functions mid-block | ||
- Dramatically speed up deflation for level 0 (storing) | ||
- Add gzfread(), duplicating the interface of fread() | ||
- Add gzfwrite(), duplicating the interface of fwrite() | ||
- Add deflateGetDictionary() function | ||
- Use snprintf() for later versions of Microsoft C | ||
- Fix *Init macros to use z_ prefix when requested | ||
- Replace as400 with os400 for OS/400 support [Monnerat] | ||
- Add crc32_z() and adler32_z() functions with size_t lengths | ||
- Update Visual Studio project files [AraHaan] | ||
|
||
Changes in 1.2.8 (28 Apr 2013) | ||
- Update contrib/minizip/iowin32.c for Windows RT [Vollant] | ||
- Do not force Z_CONST for C++ | ||
- Clean up contrib/vstudio [Ro�] | ||
- Clean up contrib/vstudio [Ro§] | ||
- Correct spelling error in zlib.h | ||
- Fix mixed line endings in contrib/vstudio | ||
|
||
|
@@ -34,7 +77,7 @@ Changes in 1.2.7.1 (24 Mar 2013) | |
- Clean up the usage of z_const and respect const usage within zlib | ||
- Clean up examples/gzlog.[ch] comparisons of different types | ||
- Avoid shift equal to bits in type (caused endless loop) | ||
- Fix unintialized value bug in gzputc() introduced by const patches | ||
- Fix uninitialized value bug in gzputc() introduced by const patches | ||
- Fix memory allocation error in examples/zran.c [Nor] | ||
- Fix bug where gzopen(), gzclose() would write an empty file | ||
- Fix bug in gzclose() when gzwrite() runs out of memory | ||
|
@@ -194,7 +237,7 @@ Changes in 1.2.5.2 (17 Dec 2011) | |
- Add a transparent write mode to gzopen() when 'T' is in the mode | ||
- Update python link in zlib man page | ||
- Get inffixed.h and MAKEFIXED result to match | ||
- Add a ./config --solo option to make zlib subset with no libary use | ||
- Add a ./config --solo option to make zlib subset with no library use | ||
- Add undocumented inflateResetKeep() function for CAB file decoding | ||
- Add --cover option to ./configure for gcc coverage testing | ||
- Add #define ZLIB_CONST option to use const in the z_stream interface | ||
|
@@ -564,7 +607,7 @@ Changes in 1.2.3.1 (16 August 2006) | |
- Update make_vms.com [Zinser] | ||
- Use -fPIC for shared build in configure [Teredesai, Nicholson] | ||
- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] | ||
- Use fdopen() (not _fdopen()) for Interix in zutil.h [B�ck] | ||
- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bck] | ||
- Add some FAQ entries about the contrib directory | ||
- Update the MVS question in the FAQ | ||
- Avoid extraneous reads after EOF in gzio.c [Brown] | ||
|
@@ -1178,7 +1221,7 @@ Changes in 1.0.6 (19 Jan 1998) | |
386 asm code replacing longest_match(). | ||
contrib/iostream/ by Kevin Ruland <[email protected]> | ||
A C++ I/O streams interface to the zlib gz* functions | ||
contrib/iostream2/ by Tyge L�vset <[email protected]> | ||
contrib/iostream2/ by Tyge Løvset <[email protected]> | ||
Another C++ I/O streams interface | ||
contrib/untgz/ by "Pedro A. Aranda Guti\irrez" <[email protected]> | ||
A very simple tar.gz file extractor using zlib | ||
|
@@ -1267,7 +1310,7 @@ Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] | |
- fix array overlay in deflate.c which sometimes caused bad compressed data | ||
- fix inflate bug with empty stored block | ||
- fix MSDOS medium model which was broken in 0.99 | ||
- fix deflateParams() which could generated bad compressed data. | ||
- fix deflateParams() which could generate bad compressed data. | ||
- Bytef is define'd instead of typedef'ed (work around Borland bug) | ||
- added an INDEX file | ||
- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ZLIB DATA COMPRESSION LIBRARY | ||
|
||
zlib 1.2.8 is a general purpose data compression library. All the code is | ||
zlib 1.2.11 is a general purpose data compression library. All the code is | ||
thread safe. The data format used by the zlib library is described by RFCs | ||
(Request for Comments) 1950 to 1952 in the files | ||
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and | ||
|
@@ -31,7 +31,7 @@ Mark Nelson <[email protected]> wrote an article about zlib for the Jan. 1997 | |
issue of Dr. Dobb's Journal; a copy of the article is available at | ||
http://marknelson.us/1997/01/01/zlib-engine/ . | ||
|
||
The changes made in version 1.2.8 are documented in the file ChangeLog. | ||
The changes made in version 1.2.11 are documented in the file ChangeLog. | ||
|
||
Unsupported third party contributions are provided in directory contrib/ . | ||
|
||
|
@@ -84,7 +84,7 @@ Acknowledgments: | |
|
||
Copyright notice: | ||
|
||
(C) 1995-2013 Jean-loup Gailly and Mark Adler | ||
(C) 1995-2017 Jean-loup Gailly and Mark Adler | ||
|
||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* crc32.c -- compute the CRC-32 of a data stream | ||
* Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler | ||
* Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler | ||
* For conditions of distribution and use, see copyright notice in zlib.h | ||
* | ||
* Thanks to Rodney Brown <[email protected]> for his contribution of faster | ||
|
@@ -30,17 +30,15 @@ | |
|
||
#include "zutil.h" /* for STDC and FAR definitions */ | ||
|
||
#define local static | ||
|
||
/* Definitions for doing the crc four data bytes at a time. */ | ||
#if !defined(NOBYFOUR) && defined(Z_U4) | ||
# define BYFOUR | ||
#endif | ||
#ifdef BYFOUR | ||
local unsigned long crc32_little OF((unsigned long, | ||
const unsigned char FAR *, unsigned)); | ||
const unsigned char FAR *, z_size_t)); | ||
local unsigned long crc32_big OF((unsigned long, | ||
const unsigned char FAR *, unsigned)); | ||
const unsigned char FAR *, z_size_t)); | ||
# define TBLS 8 | ||
#else | ||
# define TBLS 1 | ||
|
@@ -201,10 +199,10 @@ const z_crc_t FAR * ZEXPORT get_crc_table() | |
#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 | ||
|
||
/* ========================================================================= */ | ||
unsigned long ZEXPORT crc32(crc, buf, len) | ||
unsigned long ZEXPORT crc32_z(crc, buf, len) | ||
unsigned long crc; | ||
const unsigned char FAR *buf; | ||
uInt len; | ||
z_size_t len; | ||
{ | ||
if (buf == Z_NULL) return 0UL; | ||
|
||
|
@@ -235,8 +233,29 @@ unsigned long ZEXPORT crc32(crc, buf, len) | |
return crc ^ 0xffffffffUL; | ||
} | ||
|
||
/* ========================================================================= */ | ||
unsigned long ZEXPORT crc32(crc, buf, len) | ||
unsigned long crc; | ||
const unsigned char FAR *buf; | ||
uInt len; | ||
{ | ||
return crc32_z(crc, buf, len); | ||
} | ||
|
||
#ifdef BYFOUR | ||
|
||
/* | ||
This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit | ||
integer pointer type. This violates the strict aliasing rule, where a | ||
compiler can assume, for optimization purposes, that two pointers to | ||
fundamentally different types won't ever point to the same memory. This can | ||
manifest as a problem only if one of the pointers is written to. This code | ||
only reads from those pointers. So long as this code remains isolated in | ||
this compilation unit, there won't be a problem. For this reason, this code | ||
should not be copied and pasted into a compilation unit in which other code | ||
writes to the buffer that is passed to these routines. | ||
*/ | ||
|
||
/* ========================================================================= */ | ||
#define DOLIT4 c ^= *buf4++; \ | ||
c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \ | ||
|
@@ -247,7 +266,7 @@ unsigned long ZEXPORT crc32(crc, buf, len) | |
local unsigned long crc32_little(crc, buf, len) | ||
unsigned long crc; | ||
const unsigned char FAR *buf; | ||
unsigned len; | ||
z_size_t len; | ||
{ | ||
register z_crc_t c; | ||
register const z_crc_t FAR *buf4; | ||
|
@@ -278,7 +297,7 @@ local unsigned long crc32_little(crc, buf, len) | |
} | ||
|
||
/* ========================================================================= */ | ||
#define DOBIG4 c ^= *++buf4; \ | ||
#define DOBIG4 c ^= *buf4++; \ | ||
c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \ | ||
crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24] | ||
#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 | ||
|
@@ -287,7 +306,7 @@ local unsigned long crc32_little(crc, buf, len) | |
local unsigned long crc32_big(crc, buf, len) | ||
unsigned long crc; | ||
const unsigned char FAR *buf; | ||
unsigned len; | ||
z_size_t len; | ||
{ | ||
register z_crc_t c; | ||
register const z_crc_t FAR *buf4; | ||
|
@@ -300,7 +319,6 @@ local unsigned long crc32_big(crc, buf, len) | |
} | ||
|
||
buf4 = (const z_crc_t FAR *)(const void FAR *)buf; | ||
buf4--; | ||
while (len >= 32) { | ||
DOBIG32; | ||
len -= 32; | ||
|
@@ -309,7 +327,6 @@ local unsigned long crc32_big(crc, buf, len) | |
DOBIG4; | ||
len -= 4; | ||
} | ||
buf4++; | ||
buf = (const unsigned char FAR *)buf4; | ||
|
||
if (len) do { | ||
|
Oops, something went wrong.