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

Initialize some values to make scan-build happy

This commit is contained in:
jsteube 2019-04-05 12:20:36 +02:00
parent 2fab28a6f3
commit 05a38a42b7
6 changed files with 12 additions and 9 deletions

View File

@ -257,10 +257,12 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
for (u32 i = 0; i < 0x10000; i++)
{
u32 key_md4[2] = { i, 0 };
u32 key_des[2] = { 0, 0 };
u32 key_md4[2] = { 0 };
u32 key_des[2] = { 0 };
transform_netntlmv1_key ((u8 *) key_md4, (u8 *) key_des);
key_md4[0] = i;
transform_netntlmv1_key ((const u8 *) key_md4, (u8 *) key_des);
u32 Kc[16] = { 0 };
u32 Kd[16] = { 0 };

View File

@ -155,6 +155,7 @@ static void sha256aix_decode (u8 digest[32], const u8 buf[43])
digest[31] = (l >> 8) & 0xff;
digest[30] = (l >> 16) & 0xff;
}
static void sha256aix_encode (const u8 digest[32], u8 buf[43])
{
int l;
@ -352,7 +353,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
{
const u32 *digest = (const u32 *) digest_buf;
u32 tmp[8];
u32 tmp[8] = { 0 }; // this (useless?) initialization makes scan-build happy
tmp[0] = digest[0];
tmp[1] = digest[1];

View File

@ -495,7 +495,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
{
const u64 *digest = (const u64 *) digest_buf;
u64 tmp[8];
u64 tmp[8] = { 0 }; // this (useless?) initialization makes scan-build happy
tmp[0] = digest[0];
tmp[1] = digest[1];

View File

@ -254,7 +254,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
{
const u32 *digest = (const u32 *) digest_buf;
u32 tmp[5];
u32 tmp[5] = { 0 }; // this (useless?) initialization makes scan-build happy
tmp[0] = digest[0];
tmp[1] = digest[1];

View File

@ -403,7 +403,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
{
const u64 *digest = (const u64 *) digest_buf;
u64 tmp[8];
u64 tmp[8] = { 0 }; // this (useless?) initialization makes scan-build happy
tmp[0] = byte_swap_64 (digest[0]);
tmp[1] = byte_swap_64 (digest[1]);
@ -416,7 +416,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
char ptr_plain[128] = { 0 };
drupal7_encode ((unsigned char *) tmp, (unsigned char *) ptr_plain);
drupal7_encode ((const u8 *) tmp, (u8 *) ptr_plain);
// ugly hack start

View File

@ -279,7 +279,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
// encode the digest:
u32 tmp[5];
u32 tmp[5] = { 0 }; // this (useless?) initialization makes scan-build happy
tmp[0] = byte_swap_32 (digest[0]);
tmp[1] = byte_swap_32 (digest[1]);