1. 27 10月, 2016 1 次提交
  2. 04 10月, 2016 1 次提交
  3. 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
  4. 30 4月, 2012 1 次提交
    • M
      Fix type mismatch between get_crc_table() and crc_table. · 6c9bd474
      Mark Adler 提交于
      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.
      6c9bd474
  5. 13 2月, 2012 1 次提交
  6. 11 2月, 2012 1 次提交
  7. 02 2月, 2012 1 次提交
    • M
      Avoid library header include in crc32.c for Z_SOLO. · f9e4edc9
      Mark Adler 提交于
      crc32.c was #including limits.h in order to find a four-byte integer
      type.  It was doing this even if Z_SOLO were defined, violating the
      intent of Z_SOLO, which is to include no library headers and require
      no library functions.  Now crc32.c obeys the intent of Z_SOLO, but
      with the downside that crc32() will be slower than when not compiled
      with Z_SOLO.  This can be remedied manually by typedefing u4 to a
      known four-byte unsigned integer type, and #defining BYFOUR in
      crc32.c.
      f9e4edc9
  8. 12 9月, 2011 1 次提交
  9. 10 9月, 2011 25 次提交