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

pull/1962/head
Sein Coray 5 years ago
parent 97249ba1ca
commit 2da33ab0ba
No known key found for this signature in database
GPG Key ID: 44C4180EA69758EC

@ -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…
Cancel
Save