diff --git a/OpenCL/m13600-pure.cl b/OpenCL/m13600-pure.cl index 0202cf0bf..34356b3a9 100644 --- a/OpenCL/m13600-pure.cl +++ b/OpenCL/m13600-pure.cl @@ -37,7 +37,7 @@ typedef struct zip2 u32 verify_bytes; u32 compress_length; u32 data_len; - u32 data_buf[0x4000000]; + u32 data_buf[0x200000]; u32 auth_len; u32 auth_buf[4]; diff --git a/src/modules/module_13600.c b/src/modules/module_13600.c index ec1c4e6ef..66f852695 100644 --- a/src/modules/module_13600.c +++ b/src/modules/module_13600.c @@ -9,6 +9,7 @@ #include "bitops.h" #include "convert.h" #include "shared.h" +#include "memory.h" static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; static const u32 DGST_POS0 = 0; @@ -61,7 +62,7 @@ typedef struct zip2 u32 verify_bytes; u32 compress_length; u32 data_len; - u32 data_buf[0x4000000]; + u32 data_buf[0x200000]; u32 auth_len; u32 auth_buf[4]; @@ -166,7 +167,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_HEX; token.len_min[7] = 0; - token.len_max[7] = 0x4000000 * 4 * 2; + token.len_max[7] = 0x200000 * 4 * 2; token.sep[7] = '*'; token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH | TOKEN_ATTR_VERIFY_HEX; @@ -365,7 +366,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE const u32 data_len = zip2->data_len; - char data_tmp[16384 + 1] = { 0 }; + char *data_tmp = (char *) hccalloc (1, (data_len * 2) + 1); for (u32 i = 0, j = 0; i < data_len; i += 1, j += 2) { @@ -397,6 +398,8 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE auth_tmp, SIGNATURE_ZIP2_STOP); + hcfree (data_tmp); + return line_len; }