mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-11 16:21:12 +00:00
Fix: buffer sizes (again)
Also honor the trailing 0 byte for buffers used in sprintf
This commit is contained in:
parent
ee500bec02
commit
556db9a9e9
@ -200,7 +200,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
|||||||
tmp[7] = byte_swap_64 (digest[7]);
|
tmp[7] = byte_swap_64 (digest[7]);
|
||||||
tmp[8] = 0;
|
tmp[8] = 0;
|
||||||
|
|
||||||
char salt_enc[256] = { 0 };
|
char salt_enc[257] = { 0 };
|
||||||
char hash_enc[128] = { 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);
|
const size_t salt_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) pbkdf2_sha512->salt_buf, salt->salt_len, (u8 *) salt_enc);
|
||||||
|
@ -199,7 +199,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
|||||||
tmp[7] = byte_swap_32 (digest[7]);
|
tmp[7] = byte_swap_32 (digest[7]);
|
||||||
tmp[8] = 0;
|
tmp[8] = 0;
|
||||||
|
|
||||||
char salt_enc[256] = { 0 };
|
char salt_enc[257] = { 0 };
|
||||||
char hash_enc[128] = { 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);
|
const size_t salt_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) pbkdf2_sha256->salt_buf, salt->salt_len, (u8 *) salt_enc);
|
||||||
|
@ -192,7 +192,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
|||||||
tmp[4] = byte_swap_32 (digest[4]);
|
tmp[4] = byte_swap_32 (digest[4]);
|
||||||
tmp[5] = 0;
|
tmp[5] = 0;
|
||||||
|
|
||||||
char salt_enc[256] = { 0 };
|
char salt_enc[257] = { 0 };
|
||||||
char hash_enc[128] = { 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);
|
const size_t salt_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) pbkdf2_sha1->salt_buf, salt->salt_len, (u8 *) salt_enc);
|
||||||
|
Loading…
Reference in New Issue
Block a user