From 2622993c00b489b820fcc0773a26299c610694af Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Wed, 9 Oct 2019 19:15:37 +0200 Subject: [PATCH] Fix check of OPTS_TYPE_PT_HEX in selftest --- src/selftest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/selftest.c b/src/selftest.c index 53e590a1b..6265bed04 100644 --- a/src/selftest.c +++ b/src/selftest.c @@ -44,6 +44,8 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param // password : move the known password into a fake buffer + const u32 module_opts_type = module_ctx->module_opts_type (hashconfig, user_options, user_options_extra); + pw_t tmp; memset (&tmp, 0, sizeof (tmp)); @@ -52,7 +54,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param const size_t tmp_len = strlen (hashconfig->st_pass); - if (hashconfig->opts_type & OPTS_TYPE_PT_HEX) + if (module_opts_type & OPTS_TYPE_PT_HEX) { tmp.pw_len = hex_decode ((const u8 *) hashconfig->st_pass, (const int) tmp_len, (u8 *) tmp_ptr); }