1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-11 08:10:59 +00:00

Fix missing zero-byte termination in build_plain()

This commit is contained in:
jsteube 2016-10-29 22:19:00 +02:00
parent f3fc5d96c4
commit 87aed3482f
2 changed files with 11 additions and 8 deletions

View File

@ -18,15 +18,15 @@
int build_plain (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain, u32 *plain_buf, int *out_len) int build_plain (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain, u32 *plain_buf, int *out_len)
{ {
combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx; const combinator_ctx_t *combinator_ctx = hashcat_ctx->combinator_ctx;
hashconfig_t *hashconfig = hashcat_ctx->hashconfig; const hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
hashes_t *hashes = hashcat_ctx->hashes; const hashes_t *hashes = hashcat_ctx->hashes;
mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx; const mask_ctx_t *mask_ctx = hashcat_ctx->mask_ctx;
straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx; const straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx;
user_options_t *user_options = hashcat_ctx->user_options; const user_options_t *user_options = hashcat_ctx->user_options;
const u32 gidvid = plain->gidvid; const u32 gidvid = plain->gidvid;
const u32 il_pos = plain->il_pos; const u32 il_pos = plain->il_pos;
int plain_len = 0; int plain_len = 0;

View File

@ -585,6 +585,9 @@ char *status_get_input_candidates_dev (const hashcat_ctx_t *hashcat_ctx, const i
} }
else else
{ {
plain_ptr1[plain_len1] = 0;
plain_ptr2[plain_len2] = 0;
snprintf (display, HCBUFSIZ_TINY - 1, "%s -> %s", plain_ptr1, plain_ptr2); snprintf (display, HCBUFSIZ_TINY - 1, "%s -> %s", plain_ptr1, plain_ptr2);
} }