- 27 10月, 2016 1 次提交
-
-
由 Mark Adler 提交于
-
- 26 10月, 2016 1 次提交
-
-
由 Mark Adler 提交于
This updates the OS_CODE determination at compile time to match as closely as possible the operating system mappings documented in the PKWare APPNOTE.TXT version 6.3.4, section 4.4.2.2. That byte in the gzip header is used by nobody for anything, as far as I can tell. However we might as well try to set it appropriately.
-
- 25 10月, 2016 3 次提交
-
-
由 Mark Adler 提交于
This verifies that the state has been initialized, that it is the expected type of state, deflate or inflate, and that at least the first several bytes of the internal state have not been clobbered.
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
There is a bug in deflate for windowBits == 8 (256-byte window). As a result, zlib silently changes a request for 8 to a request for 9 (512-byte window), and sets the zlib header accordingly so that the decompressor knows to use a 512-byte window. However if deflateInit2() is used for raw deflate or gzip streams, then there is no indication that the request was not honored, and the application might assume that it can use a 256-byte window when decompressing. This commit returns an error if the user requests a 256-byte window when using raw deflate or gzip encoding.
-
- 15 10月, 2016 4 次提交
-
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
This avoid defining a macro that is never used when not debugging.
-
由 Mark Adler 提交于
Recursive macro calls are normally caught by the preprocessor and avoided. This commit avoids the possibility of a problem entirely.
-
由 Mark Adler 提交于
-
- 12 10月, 2016 3 次提交
-
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
-
- 04 10月, 2016 1 次提交
-
-
由 Mark Adler 提交于
See the comment for more details. This is in response to an issue raised as a result of a security audit of the zlib code by Trail of Bits and TrustInSoft, in support of the Mozilla Foundation.
-
- 29 9月, 2016 1 次提交
-
-
由 Mark Adler 提交于
There was a small optimization for PowerPCs to pre-increment a pointer when accessing a word, instead of post-incrementing. This required prefacing the loop with a decrement of the pointer, possibly pointing before the object passed. This is not compliant with the C standard, for which decrementing a pointer before its allocated memory is undefined. When tested on a modern PowerPC with a modern compiler, the optimization no longer has any effect. Due to all that, and per the recommendation of a security audit of the zlib code by Trail of Bits and TrustInSoft, in support of the Mozilla Foundation, this "optimization" was removed, in order to avoid the possibility of undefined behavior.
-
- 22 9月, 2016 3 次提交
-
-
由 Mark Adler 提交于
inftrees.c was subtracting an offset from a pointer to an array, in order to provide a pointer that allowed indexing starting at the offset. This is not compliant with the C standard, for which the behavior of a pointer decremented before its allocated memory is undefined. Per the recommendation of a security audit of the zlib code by Trail of Bits and TrustInSoft, in support of the Mozilla Foundation, this tiny optimization was removed, in order to avoid the possibility of undefined behavior.
-
由 Mark Adler 提交于
An old inffast.c optimization turns out to not be optimal anymore with modern compilers, and furthermore was not compliant with the C standard, for which decrementing a pointer before its allocated memory is undefined. Per the recommendation of a security audit of the zlib code by Trail of Bits and TrustInSoft, in support of the Mozilla Foundation, this "optimization" was removed, in order to avoid the possibility of undefined behavior.
-
由 Mark Adler 提交于
While woolly mammoths still roamed the Earth and before Atlantis sunk into the ocean, there were C compilers that could not handle forward structure references, e.g. "struct name;". zlib dutifully provided a work-around for such compilers. That work-around is no longer needed, and, per the recommendation of a security audit of the zlib code by Trail of Bits and TrustInSoft, in support of the Mozilla Foundation, should be removed since what a compiler will do with this is technically undefined. From the report: "there is no telling what interactions the bug could have in the future with link-time optimizations and type-based alias analyses, both features that are present (but not default) in clang."
-
- 21 9月, 2016 3 次提交
-
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
The undocumented (except in these commit comments) function inflateValidate(strm, check) can be called after an inflateInit(), inflateInit2(), or inflateReset2() with check equal to zero to turn off the check value (CRC-32 or Adler-32) computation and comparison. Calling with check not equal to zero turns checking back on. This should only be called immediately after the init or reset function. inflateReset() does not change the state, so a previous inflateValidate() setting will remain in effect. This also turns off validation of the gzip header CRC when present. This should only be used when a zlib or gzip stream has already been checked, and repeated decompressions of the same stream no longer need to be validated.
-
由 Mark Adler 提交于
-
- 11 7月, 2016 1 次提交
-
-
由 Mark Adler 提交于
-
- 18 6月, 2016 1 次提交
-
-
由 Mark Adler 提交于
-
- 05 4月, 2016 1 次提交
-
-
由 Mark Adler 提交于
-
- 30 1月, 2016 1 次提交
-
-
由 Mark Adler 提交于
-
- 27 11月, 2015 1 次提交
-
-
由 Mark Adler 提交于
When windowBits is zero, the size of the sliding window comes from the zlib header. The allowed values of the four-bit field are 0..7, but when windowBits is zero, values greater than 7 are permitted and acted upon, resulting in large, mostly unused memory allocations. This fix rejects such invalid zlib headers.
-
- 05 10月, 2015 1 次提交
-
-
由 Mark Adler 提交于
A remarkably creative and diverse set of approaches to letting the compiler know that opaque was being used when it wasn't is changed by this commit to the more standard (void)opaque.
-
- 17 9月, 2015 1 次提交
-
-
由 Mark Adler 提交于
-
- 06 9月, 2015 2 次提交
-
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
The C standard says that bit shifts of negative integers is undefined. This casts to unsigned values to assure a known result.
-
- 16 8月, 2015 2 次提交
-
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
This is in order to permit shared memory for these structures.
-
- 03 8月, 2015 2 次提交
-
-
由 Mark Adler 提交于
To build, simply run configure from the source directory by specifying its path. That path will be used to find the source files. The source directory will not be touched. All new and modified files will be made in the current directory. Discovered in the process that not all makes understand % or $<, and not all compilers understand -include or -I-. This required a larger Makefile.in with explicit dependencies.
-
由 Mark Adler 提交于
Sun compiler complained. Use (unsigned)0 - 1 instead.
-
- 02 8月, 2015 2 次提交
-
-
由 Mark Adler 提交于
This updates the documentation to reflect the behavior of deflateParams() when it is not able to compress all of the input data provided so far due to insufficient output space. It also assures that data provided is compressed before the parameter changes, even if at the beginning of the stream.
-
由 Mark Adler 提交于
-
- 29 7月, 2015 5 次提交
-
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
It previously could have been misinterpreted to mean that parameter changes after deflateInit2() would be reversed, which is not the case.
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
-
由 Mark Adler 提交于
-