[BUGREPORT] 64-bit hashcat crashes when a rule file has exactly 2 rules
#1
hashcat 0.40 crashes under the following use:

hashcat-cli64.exe -a 1 test.dic test.dic -r rules\lc.rule --stdout

Faulting application name: hashcat-cli64.exe, version: 0.0.0.0, time stamp: 0x501ea8eb
Faulting module name: hashcat-cli64.exe, version: 0.0.0.0, time stamp: 0x501ea8eb
Exception code: 0xc0000005
Fault offset: 0x000000000003fa03

where lc.rule contains just two rules.

I first observed it with rules:

PHP Code:
lc.rule:
## Try lowercasing everything, how boring
:


however I've tried several other two-rule combinations and they all cause the same crash so it seems its more related to the number of rules than the rules themselves. I also tried removing the comment on the slim chance that it was somehow a factor and it made no difference.

One rule works fine, three and four rules tested fine as well, as did large rule sets like passwordspro.rule or generated.rule. This issue seems to be strictly related to a file with exactly two rules.

hashcat-cli32.exe works happily with the same invocation, so this seems limited to the 64-bit version.

I'm happy to test a solution if that helps but I expect you'll be able to replicate fairly simply.

Thanks for all the the great work that's gone into these tools, they are far and away the best I've found.
#2
Re-produced. Confirmed.