1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-13 19:28:56 +00:00

fixed issue with converting more than needed and using too much memory

This commit is contained in:
Sein Coray 2019-03-21 21:12:18 +01:00
parent 97249ba1ca
commit 2da33ab0ba
No known key found for this signature in database
GPG Key ID: 44C4180EA69758EC
4 changed files with 4 additions and 4 deletions

View File

@ -260,7 +260,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
p = strtok(NULL, "*");
if (p == NULL) return PARSER_HASH_LENGTH;
hex_to_binary(p, strlen(p) * 2, (char *) &(pkzip->hash.data));
hex_to_binary(p, strlen(p), (char *) &(pkzip->hash.data));
// fake salt
salt->salt_buf[0] = pkzip->hash.data[ 3] << 24 | pkzip->hash.data[ 2] << 16 | pkzip->hash.data[ 1] << 8 | pkzip->hash.data[ 0];

View File

@ -259,7 +259,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
p = strtok(NULL, "*");
if (p == NULL) return PARSER_HASH_LENGTH;
hex_to_binary(p, strlen(p) * 2, (char *) &(pkzip->hash.data));
hex_to_binary(p, strlen(p), (char *) &(pkzip->hash.data));
// fake salt
salt->salt_buf[0] = pkzip->hash.data[ 3] << 24 | pkzip->hash.data[ 2] << 16 | pkzip->hash.data[ 1] << 8 | pkzip->hash.data[ 0];

View File

@ -262,7 +262,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
p = strtok(NULL, "*");
if (p == NULL) return PARSER_HASH_LENGTH;
hex_to_binary(p, strlen(p) * 2, (char *) &(pkzip->hashes[i].data));
hex_to_binary(p, strlen(p), (char *) &(pkzip->hashes[i].data));
// fake salt
salt->salt_buf[0] ^= pkzip->hashes[i].data[ 3] << 24 | pkzip->hashes[i].data[ 2] << 16 | pkzip->hashes[i].data[ 1] << 8 | pkzip->hashes[i].data[ 0];

View File

@ -262,7 +262,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
p = strtok(NULL, "*");
if (p == NULL) return PARSER_HASH_LENGTH;
hex_to_binary(p, strlen(p) * 2, (char *) &(pkzip->hashes[i].data));
hex_to_binary(p, strlen(p), (char *) &(pkzip->hashes[i].data));
// fake salt
salt->salt_buf[0] ^= pkzip->hashes[i].data[ 3] << 24 | pkzip->hashes[i].data[ 2] << 16 | pkzip->hashes[i].data[ 1] << 8 | pkzip->hashes[i].data[ 0];