diff --git a/docs/changes.txt b/docs/changes.txt index 2b5ca203c..1a0fa0ae3 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -25,6 +25,7 @@ - Fixed a hash parsing problem for 7-Zip hashes: allow a longer crc32 data length field within the hash format - Fixed the output of --show if $HEX[] passwords are present within the potfile - Fixed a restore issue leading to "Restore value is greater than keyspace" in case mask-files or wordlist-folders were used +- Fixed a mask-length check issue: Return -1 in case the mask-length is not within the password-length range ## ## Improvements diff --git a/src/mpsp.c b/src/mpsp.c index 5d735c378..25a15fed7 100644 --- a/src/mpsp.c +++ b/src/mpsp.c @@ -1284,18 +1284,20 @@ int mask_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) if (mask_ctx->css_cnt < mask_min) { event_log_warning (hashcat_ctx, "Skipping mask '%s' because it is smaller than the minimum password length.", mask_ctx->mask); + event_log_warning (hashcat_ctx, NULL); } if (mask_ctx->css_cnt > mask_max) { event_log_warning (hashcat_ctx, "Skipping mask '%s' because it is larger than the maximum password length.", mask_ctx->mask); + event_log_warning (hashcat_ctx, NULL); } // skip to next mask logfile_sub_msg ("STOP"); - return 0; + return -1; } if (hashconfig->opts_type & OPTS_TYPE_PT_UTF16LE)