From c768073f6072381c068ad13398964307c7826abc Mon Sep 17 00:00:00 2001 From: Sein Coray Date: Thu, 21 Mar 2019 21:37:24 +0100 Subject: [PATCH] fixed static limit for uncompress output to length defined --- OpenCL/m17200_a0-pure.cl | 4 ++-- OpenCL/m17200_a1-pure.cl | 4 ++-- OpenCL/m17200_a3-pure.cl | 4 ++-- OpenCL/m17220_a0-pure.cl | 4 ++-- OpenCL/m17220_a1-pure.cl | 4 ++-- OpenCL/m17220_a3-pure.cl | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/OpenCL/m17200_a0-pure.cl b/OpenCL/m17200_a0-pure.cl index 1328d458c..8fab34e48 100644 --- a/OpenCL/m17200_a0-pure.cl +++ b/OpenCL/m17200_a0-pure.cl @@ -664,7 +664,7 @@ __kernel void m17200_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input infstream.next_in = (Bytef *) compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *) inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default @@ -936,7 +936,7 @@ __kernel void m17200_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input infstream.next_in = (Bytef *) compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *) inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default diff --git a/OpenCL/m17200_a1-pure.cl b/OpenCL/m17200_a1-pure.cl index 0a481bd83..1ab9916f8 100644 --- a/OpenCL/m17200_a1-pure.cl +++ b/OpenCL/m17200_a1-pure.cl @@ -664,7 +664,7 @@ __kernel void m17200_sxx (KERN_ATTR_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default @@ -937,7 +937,7 @@ __kernel void m17200_mxx (KERN_ATTR_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default diff --git a/OpenCL/m17200_a3-pure.cl b/OpenCL/m17200_a3-pure.cl index cfe13900c..fb65d2438 100644 --- a/OpenCL/m17200_a3-pure.cl +++ b/OpenCL/m17200_a3-pure.cl @@ -670,7 +670,7 @@ __kernel void m17200_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default @@ -949,7 +949,7 @@ __kernel void m17200_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hash.data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default diff --git a/OpenCL/m17220_a0-pure.cl b/OpenCL/m17220_a0-pure.cl index 828ca77e2..0a6dcf202 100644 --- a/OpenCL/m17220_a0-pure.cl +++ b/OpenCL/m17220_a0-pure.cl @@ -680,7 +680,7 @@ __kernel void m17220_sxx (KERN_ATTR_RULES_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default @@ -970,7 +970,7 @@ __kernel void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default diff --git a/OpenCL/m17220_a1-pure.cl b/OpenCL/m17220_a1-pure.cl index f1dfc2e50..c11a2ca08 100644 --- a/OpenCL/m17220_a1-pure.cl +++ b/OpenCL/m17220_a1-pure.cl @@ -680,7 +680,7 @@ __kernel void m17220_sxx (KERN_ATTR_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default @@ -972,7 +972,7 @@ __kernel void m17220_mxx (KERN_ATTR_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default diff --git a/OpenCL/m17220_a3-pure.cl b/OpenCL/m17220_a3-pure.cl index 0dc5e38fc..98c20276c 100644 --- a/OpenCL/m17220_a3-pure.cl +++ b/OpenCL/m17220_a3-pure.cl @@ -684,7 +684,7 @@ __kernel void m17220_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default @@ -979,7 +979,7 @@ __kernel void m17220_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t)) infstream.opaque = Z_NULL; infstream.avail_in = esalt_bufs[digests_offset].hashes[idx].data_length - 12; // size of input infstream.next_in = (Bytef *)compressed; // input char array - infstream.avail_out = 2048; // size of output + infstream.avail_out = MAX_UNCOMPRESSED_LENGTH; // size of output infstream.next_out = (Bytef *)inflated; // output char array // inflateinit2 is needed because otherwise it checks for headers by default