From 518983d3a08532f50a84fd743b70fdb3cea14298 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Fri, 27 Jan 2017 23:18:22 +0100 Subject: [PATCH] Do not check hc_path_read() if hc_path_exist() failed for commandline hash argument --- src/user_options.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/user_options.c b/src/user_options.c index f89a8f453..8ba934734 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -1321,11 +1321,14 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx) if (user_options_extra->hc_hash != NULL) { - if (hc_path_read (user_options_extra->hc_hash) == false) + if (hc_path_exist (user_options_extra->hc_hash) == true) { - event_log_error (hashcat_ctx, "%s: %m", user_options_extra->hc_hash); + if (hc_path_read (user_options_extra->hc_hash) == false) + { + event_log_error (hashcat_ctx, "%s: %m", user_options_extra->hc_hash); - return -1; + return -1; + } } }