1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 15:18:16 +00:00

Fix: buffer sizes (again)

Also honor the trailing 0 byte for buffers used in sprintf
This commit is contained in:
vlo 2019-05-10 08:43:25 +02:00
parent ee500bec02
commit 556db9a9e9
3 changed files with 3 additions and 3 deletions

View File

@ -200,7 +200,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
tmp[7] = byte_swap_64 (digest[7]);
tmp[8] = 0;
char salt_enc[256] = { 0 };
char salt_enc[257] = { 0 };
char hash_enc[128] = { 0 };
const size_t salt_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) pbkdf2_sha512->salt_buf, salt->salt_len, (u8 *) salt_enc);

View File

@ -199,7 +199,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
tmp[7] = byte_swap_32 (digest[7]);
tmp[8] = 0;
char salt_enc[256] = { 0 };
char salt_enc[257] = { 0 };
char hash_enc[128] = { 0 };
const size_t salt_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) pbkdf2_sha256->salt_buf, salt->salt_len, (u8 *) salt_enc);

View File

@ -192,7 +192,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
tmp[4] = byte_swap_32 (digest[4]);
tmp[5] = 0;
char salt_enc[256] = { 0 };
char salt_enc[257] = { 0 };
char hash_enc[128] = { 0 };
const size_t salt_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) pbkdf2_sha1->salt_buf, salt->salt_len, (u8 *) salt_enc);