1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-26 09:58:16 +00:00

Fix buffer overflow in status_get_hash_target()

This commit is contained in:
jsteube 2016-10-19 13:51:06 +02:00
parent a460ab01b6
commit 0a26b09684
2 changed files with 11 additions and 3 deletions

View File

@ -226,7 +226,9 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
// hash
char out_buf[HCBUFSIZ_LARGE] = { 0 };
char out_buf[HCBUFSIZ_LARGE];
out_buf[0] = 0;
ascii_digest (hashcat_ctx, out_buf, salt_pos, digest_pos);

View File

@ -269,11 +269,17 @@ char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx)
}
else
{
char *tmp_buf = (char *) malloc (HCBUFSIZ_TINY);
char *tmp_buf = (char *) malloc (HCBUFSIZ_LARGE);
tmp_buf[0] = 0;
ascii_digest ((hashcat_ctx_t *) hashcat_ctx, tmp_buf, 0, 0);
return tmp_buf;
char *tmp_buf2 = strdup (tmp_buf);
free (tmp_buf);
return tmp_buf2;
}
}
else