diff options
Diffstat (limited to 'dev-libs/libzip/files/libzip-0.10.1-fix_decrypt.patch')
-rw-r--r-- | dev-libs/libzip/files/libzip-0.10.1-fix_decrypt.patch | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/dev-libs/libzip/files/libzip-0.10.1-fix_decrypt.patch b/dev-libs/libzip/files/libzip-0.10.1-fix_decrypt.patch deleted file mode 100644 index ae3777889e00..000000000000 --- a/dev-libs/libzip/files/libzip-0.10.1-fix_decrypt.patch +++ /dev/null @@ -1,37 +0,0 @@ -Modify the calls to the CRC table because original calls did not behave correctly on 64-bit systems. Patch from libzip upstream commit 0e67d378b271, modified so that it applies correctly. ---- libzip-0.10.1/lib/zip_source_pkware.c -+++ libzip-0.10.1/lib/zip_source_pkware.c -@@ -49,10 +49,6 @@ - #define KEY1 591751049 - #define KEY2 878082192 - --static const uLongf *crc = NULL; -- --#define CRC32(c, b) (crc[((c) ^ (b)) & 0xff] ^ ((c) >> 8)) -- - - - static void decrypt(struct trad_pkware *, zip_uint8_t *, -@@ -80,9 +76,6 @@ - return NULL; - } - -- if (crc == NULL) -- crc = get_crc_table(); -- - if ((ctx=(struct trad_pkware *)malloc(sizeof(*ctx))) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; -@@ -128,10 +121,10 @@ - out[i] = b; - - /* update keys */ -- ctx->key[0] = CRC32(ctx->key[0], b); -+ ctx->key[0] = crc32(ctx->key[0] ^ 0xffffffffUL, &b, 1) ^ 0xffffffffUL; - ctx->key[1] = (ctx->key[1] + (ctx->key[0] & 0xff)) * 134775813 + 1; - b = ctx->key[1] >> 24; -- ctx->key[2] = CRC32(ctx->key[2], b); -+ ctx->key[2] = crc32(ctx->key[2] ^ 0xffffffffUL, &b, 1) ^ 0xffffffffUL; - } - } - |