1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-23 08:38:09 +00:00

Fix CID 1402873: Dereference before null check

This commit is contained in:
jsteube 2017-02-14 20:53:42 +01:00
parent 1afc47829f
commit 6bcfca26b3

View File

@ -619,8 +619,6 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
u32 user_len = 0;
if (hash1->hash_info != NULL)
{
user_t *user = hash1->hash_info->user;
if (user)
@ -631,7 +629,6 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
username[user_len] = 0;
}
}
u8 *tmp_buf = potfile_ctx->tmp_buf;
@ -641,8 +638,6 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
u8 mixed_len = 0;
if (hash1)
{
if (digests_shown[hashes_idx] == 1)
{
memcpy (mixed_buf + mixed_len, hash1->pw_buf, hash1->pw_len);
@ -655,7 +650,6 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
mixed_len += strlen (LM_MASKED_PLAIN);
}
}
if (hash2)
{
@ -803,8 +797,6 @@ int potfile_handle_left (hashcat_ctx_t *hashcat_ctx)
u32 user_len = 0;
if (hash1->hash_info != NULL)
{
user_t *user = hash1->hash_info->user;
if (user)
@ -815,7 +807,6 @@ int potfile_handle_left (hashcat_ctx_t *hashcat_ctx)
username[user_len] = 0;
}
}
u8 *tmp_buf = potfile_ctx->tmp_buf;