From eb276f12f6c976a390cfca76d41fce13831ad9f3 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Wed, 7 Jun 2023 21:06:57 +0200 Subject: [PATCH] do not allow negative kern_type --- src/backend.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/backend.c b/src/backend.c index ea6fa7acd..ef50b98a3 100644 --- a/src/backend.c +++ b/src/backend.c @@ -9893,6 +9893,13 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } } + if ((int) kern_type == -1) + { + event_log_error (hashcat_ctx, "Invalid hash-mode selected: -1"); + + return -1; + } + // built options const size_t build_options_sz = 4096;