summaryrefslogtreecommitdiff
path: root/ext/zip/lib/zip_source_pkware.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zip/lib/zip_source_pkware.c')
-rw-r--r--ext/zip/lib/zip_source_pkware.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/zip/lib/zip_source_pkware.c b/ext/zip/lib/zip_source_pkware.c
index ce281ac148..125e4e2c2a 100644
--- a/ext/zip/lib/zip_source_pkware.c
+++ b/ext/zip/lib/zip_source_pkware.c
@@ -1,6 +1,6 @@
/*
zip_source_pkware.c -- Traditional PKWARE de/encryption routines
- Copyright (C) 2009-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 2009-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -107,7 +107,7 @@ decrypt(struct trad_pkware *ctx, zip_uint8_t *out, const zip_uint8_t *in,
if (!update_only) {
/* decrypt next byte */
tmp = (zip_uint16_t)(ctx->key[2] | 2);
- tmp = (zip_uint16_t)((tmp * (tmp ^ 1)) >> 8);
+ tmp = (zip_uint16_t)(((zip_uint32_t)tmp * (tmp ^ 1)) >> 8);
b ^= (Bytef)tmp;
}