From 3da0232ead009024ca225f92d0da7c706a24794e Mon Sep 17 00:00:00 2001 From: jsteube Date: Sat, 12 Nov 2016 15:46:42 +0100 Subject: [PATCH] Remove some code which was already moved from mpsp.c to interface.c --- src/mpsp.c | 8 +------- src/status.c | 2 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mpsp.c b/src/mpsp.c index 8ab30fcd6..6404daad1 100644 --- a/src/mpsp.c +++ b/src/mpsp.c @@ -1067,7 +1067,7 @@ int mask_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) hashconfig->pw_min = pw_min; hashconfig->pw_max = pw_max; - // check if mask is not too large or too small for pw_min/pw_max (*2 if unicode) + // check if mask is not too large or too small for pw_min/pw_max u32 mask_min = hashconfig->pw_min; u32 mask_max = hashconfig->pw_max; @@ -1091,12 +1091,6 @@ int mask_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) return 0; } - if (hashconfig->opts_type & OPTS_TYPE_PT_UNICODE) - { - mask_min *= 2; - mask_max *= 2; - } - if (hashconfig->opts_type & OPTS_TYPE_PT_UNICODE) { const int rc = mp_css_unicode_expand (hashcat_ctx); diff --git a/src/status.c b/src/status.c index 3333782ce..a314f4f26 100644 --- a/src/status.c +++ b/src/status.c @@ -48,6 +48,8 @@ static char *status_get_rules_file (const hashcat_ctx_t *hashcat_ctx) tmp_len += snprintf (tmp_buf + tmp_len, HCBUFSIZ_TINY - tmp_len - 1, "%s", user_options->rp_files[i]); + tmp_buf[tmp_len] = 0; + return tmp_buf; // yes, user need to free() }