From 062e539b02fc6b1a78a159b75558cb477655b08e Mon Sep 17 00:00:00 2001
From: jsteube <jens.steube@gmail.com>
Date: Fri, 28 Dec 2018 10:56:45 +0100
Subject: [PATCH] Workaround old salt length problem

---
 tools/test.pl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/test.pl b/tools/test.pl
index b01c2277f..55249f1fe 100755
--- a/tools/test.pl
+++ b/tools/test.pl
@@ -123,6 +123,15 @@ sub single
                                  ($IS_OPTIMIZED == 1) ? $constraints->[3]->[1] : $constraints->[1]->[1]);
     }
 
+    if ($IS_OPTIMIZED == 1)
+    {
+      # longer than 51 triggers a parser bug in old hashcat, have to leave this during migration phase
+      # #define SALT_MAX_OLD        51
+      # salt_max = SALT_MAX_OLD;
+
+      next if ($salt_len >= 51);
+    }
+
     # make sure the salt length is only increasing, not sure if we actually need it
 
     next if ($salt_len_prev > $salt_len);