summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortakacsd <takacsd@gmail.com>2012-11-30 19:43:50 +0100
committerMark Adler <madler@alumni.caltech.edu>2013-02-23 23:32:30 -0800
commit63ba7582b80eb81b126c2931e485481c35596aab (patch)
tree4de1e956fced5945dee8458338627a96bf747ed3
parent00dfee0b2e235bcdb5321dd3bde199ee716a2f64 (diff)
downloadzlib-63ba7582b80eb81b126c2931e485481c35596aab.tar.gz
zlib-63ba7582b80eb81b126c2931e485481c35596aab.tar.bz2
zlib-63ba7582b80eb81b126c2931e485481c35596aab.zip
Fix types in contrib/minizip to match result of get_crc_table().
-rw-r--r--contrib/minizip/crypt.h8
-rw-r--r--contrib/minizip/unzip.c2
-rw-r--r--contrib/minizip/zip.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/contrib/minizip/crypt.h b/contrib/minizip/crypt.h
index a01d08d..1e9e820 100644
--- a/contrib/minizip/crypt.h
+++ b/contrib/minizip/crypt.h
@@ -32,7 +32,7 @@
32/*********************************************************************** 32/***********************************************************************
33 * Return the next byte in the pseudo-random sequence 33 * Return the next byte in the pseudo-random sequence
34 */ 34 */
35static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) 35static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
36{ 36{
37 unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an 37 unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
38 * unpredictable manner on 16-bit systems; not a problem 38 * unpredictable manner on 16-bit systems; not a problem
@@ -45,7 +45,7 @@ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
45/*********************************************************************** 45/***********************************************************************
46 * Update the encryption keys with the next byte of plain text 46 * Update the encryption keys with the next byte of plain text
47 */ 47 */
48static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) 48static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
49{ 49{
50 (*(pkeys+0)) = CRC32((*(pkeys+0)), c); 50 (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
51 (*(pkeys+1)) += (*(pkeys+0)) & 0xff; 51 (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
@@ -62,7 +62,7 @@ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int
62 * Initialize the encryption keys and the random header according to 62 * Initialize the encryption keys and the random header according to
63 * the given password. 63 * the given password.
64 */ 64 */
65static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) 65static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
66{ 66{
67 *(pkeys+0) = 305419896L; 67 *(pkeys+0) = 305419896L;
68 *(pkeys+1) = 591751049L; 68 *(pkeys+1) = 591751049L;
@@ -91,7 +91,7 @@ static int crypthead(const char* passwd, /* password string */
91 unsigned char* buf, /* where to write header */ 91 unsigned char* buf, /* where to write header */
92 int bufSize, 92 int bufSize,
93 unsigned long* pkeys, 93 unsigned long* pkeys,
94 const unsigned long* pcrc_32_tab, 94 const z_crc_t* pcrc_32_tab,
95 unsigned long crcForCrypting) 95 unsigned long crcForCrypting)
96{ 96{
97 int n; /* index in random header */ 97 int n; /* index in random header */
diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c
index 26b2e0f..9093504 100644
--- a/contrib/minizip/unzip.c
+++ b/contrib/minizip/unzip.c
@@ -188,7 +188,7 @@ typedef struct
188 188
189# ifndef NOUNCRYPT 189# ifndef NOUNCRYPT
190 unsigned long keys[3]; /* keys defining the pseudo-random sequence */ 190 unsigned long keys[3]; /* keys defining the pseudo-random sequence */
191 const unsigned long* pcrc_32_tab; 191 const z_crc_t* pcrc_32_tab;
192# endif 192# endif
193} unz64_s; 193} unz64_s;
194 194
diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c
index 147934c..ea54853 100644
--- a/contrib/minizip/zip.c
+++ b/contrib/minizip/zip.c
@@ -157,7 +157,7 @@ typedef struct
157 ZPOS64_T totalUncompressedData; 157 ZPOS64_T totalUncompressedData;
158#ifndef NOCRYPT 158#ifndef NOCRYPT
159 unsigned long keys[3]; /* keys defining the pseudo-random sequence */ 159 unsigned long keys[3]; /* keys defining the pseudo-random sequence */
160 const unsigned long* pcrc_32_tab; 160 const z_crc_t* pcrc_32_tab;
161 int crypt_header_size; 161 int crypt_header_size;
162#endif 162#endif
163} curfile64_info; 163} curfile64_info;