From 98129da7dc892d9087b4d0a9f410276659e393f1 Mon Sep 17 00:00:00 2001 From: philsmd Date: Wed, 15 Feb 2017 12:57:18 +0100 Subject: [PATCH] add dummy check around hashcat_get_status () within inner2_loop to make coverity happy --- src/hashcat.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hashcat.c b/src/hashcat.c index 72c2e86f5..f672fa6af 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -268,7 +268,10 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx) logfile_sub_uint (runtime_start); logfile_sub_uint (runtime_stop); - hashcat_get_status (hashcat_ctx, status_ctx->hashcat_status_final); + if (hashcat_get_status (hashcat_ctx, status_ctx->hashcat_status_final) == -1) + { + fprintf (stderr, "Initialization problem: the hashcat status monitoring function returned an unexpected value\n"); + } status_ctx->accessible = false; @@ -1219,7 +1222,7 @@ int hashcat_get_status (hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_st memset (hashcat_status, 0, sizeof (hashcat_status_t)); - if (status_ctx == NULL) return -1; // ways too early + if (status_ctx == NULL) return -1; // way too early if (status_ctx->accessible == false) {