From ba56f41d26f9c62bee52d72af72b95882b63c378 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 17 Mar 2019 15:01:41 +0100 Subject: [PATCH] Abort session if module_hash_binary_count () returns zero --- src/hashes.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hashes.c b/src/hashes.c index d14fbb7f1..479cfe3d5 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -604,6 +604,13 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) { const int binary_count = module_ctx->module_hash_binary_count (hashes); + if (binary_count == 0) + { + event_log_error (hashcat_ctx, "No hashes loaded."); + + return -1; + } + if (binary_count == -1) { event_log_error (hashcat_ctx, "%s: %s", hashes->hashfile, strerror (errno));