1. 31 12月, 2016 8 次提交
  2. 05 12月, 2016 3 次提交
  3. 04 12月, 2016 12 次提交
  4. 30 10月, 2016 1 次提交
  5. 28 10月, 2016 1 次提交
    • M
      Fix bug when level 0 used with Z_HUFFMAN or Z_RLE. · 94575859
      Mark Adler 提交于
      Compression level 0 requests no compression, using only stored
      blocks. When Z_HUFFMAN or Z_RLE was used with level 0 (granted,
      an odd choice, but permitted), the resulting blocks were mostly
      fixed or dynamic. The reason is that deflate_stored() was not
      being called in that case. The compressed data was valid, but it
      was not what the application requested. This commit assures that
      only stored blocks are emitted for compression level 0, regardless
      of the strategy selected.
      94575859
  6. 27 10月, 2016 1 次提交
  7. 26 10月, 2016 1 次提交
    • M
      Make a noble effort at setting OS_CODE correctly. · ce12c5cd
      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.
      ce12c5cd
  8. 25 10月, 2016 3 次提交
    • M
      Do a more thorough check of the state for every stream call. · b516b4bd
      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.
      b516b4bd
    • M
      77fd7e56
    • M
      Reject a window size of 256 bytes if not using the zlib wrapper. · 049578f0
      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.
      049578f0
  9. 15 10月, 2016 4 次提交
  10. 12 10月, 2016 3 次提交
  11. 04 10月, 2016 1 次提交
  12. 29 9月, 2016 1 次提交
    • M
      Avoid pre-decrement of pointer in big-endian CRC calculation. · d1d57749
      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.
      d1d57749
  13. 22 9月, 2016 1 次提交
    • M
      Remove offset pointer optimization in inftrees.c. · 6a043145
      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.
      6a043145