From 3543094591fd718f69b218604bc51dd622e0e92d Mon Sep 17 00:00:00 2001
From: Jens Steube <jens.steube@gmail.com>
Date: Tue, 4 May 2021 21:44:21 +0200
Subject: [PATCH] Make sure no password candidates get rejected for line length
 in -a 9 mode

---
 src/dispatch.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/dispatch.c b/src/dispatch.c
index 95becf6bc..25c40ea7f 100644
--- a/src/dispatch.c
+++ b/src/dispatch.c
@@ -1406,6 +1406,14 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
               line_len = (u32) rule_len_out;
             }
 
+            if (user_options->attack_mode == ATTACK_MODE_ASSOCIATION)
+            {
+              // we can't reject password base on length in -a 9 because it will bring the schedule out of sync
+              // therefore we render it defective so the other candidates survive
+
+              line_len = MIN (line_len, hashconfig->pw_max);
+            }
+
             if (attack_kern == ATTACK_KERN_STRAIGHT)
             {
               if ((line_len < hashconfig->pw_min) || (line_len > hashconfig->pw_max))