aboutsummaryrefslogtreecommitdiff
path: root/zlib/contrib/minizip/crypt.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-22 15:56:58 +0200
committermarha <marha@users.sourceforge.net>2012-06-22 15:56:58 +0200
commit66841fa144ddd72df67ab1ddf880ca508d4bc9e3 (patch)
tree7cf0afebcfa94bcc8b2046c85532efcf6b0f91d0 /zlib/contrib/minizip/crypt.h
parent1a68b7aceea62a76127f0fa13b3f127e37b2ec76 (diff)
parent7baa3d795c87c11550f1686488c968320428cbf9 (diff)
downloadvcxsrv-66841fa144ddd72df67ab1ddf880ca508d4bc9e3.tar.gz
vcxsrv-66841fa144ddd72df67ab1ddf880ca508d4bc9e3.tar.bz2
vcxsrv-66841fa144ddd72df67ab1ddf880ca508d4bc9e3.zip
Merge remote-tracking branch 'origin/released'
Conflicts: zlib/Makefile
Diffstat (limited to 'zlib/contrib/minizip/crypt.h')
-rw-r--r--zlib/contrib/minizip/crypt.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/zlib/contrib/minizip/crypt.h b/zlib/contrib/minizip/crypt.h
index 622f4bc2e..a01d08d93 100644
--- a/zlib/contrib/minizip/crypt.h
+++ b/zlib/contrib/minizip/crypt.h
@@ -87,13 +87,12 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned lon
# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
# endif
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
- const char *passwd; /* password string */
- unsigned char *buf; /* where to write header */
- int bufSize;
- unsigned long* pkeys;
- const unsigned long* pcrc_32_tab;
- unsigned long crcForCrypting;
+static int crypthead(const char* passwd, /* password string */
+ unsigned char* buf, /* where to write header */
+ int bufSize,
+ unsigned long* pkeys,
+ const unsigned long* pcrc_32_tab,
+ unsigned long crcForCrypting)
{
int n; /* index in random header */
int t; /* temporary */
@@ -124,8 +123,8 @@ static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
{
buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
}
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
+ buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
+ buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
return n;
}