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:
parent
97249ba1ca
commit
2da33ab0ba
@ -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];
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user