diff --git a/src/status.c b/src/status.c index 74aa248d9..0f539a67f 100644 --- a/src/status.c +++ b/src/status.c @@ -753,6 +753,14 @@ char *status_get_time_estimated_absolute (const hashcat_ctx_t *hashcat_ctx) } } + // we need this check to avoid integer overflow + #if defined (_WIN) + if (sec_etc > 100000000) + { + sec_etc = 100000000; + } + #endif + time_t now; time (&now); @@ -803,6 +811,14 @@ char *status_get_time_estimated_relative (const hashcat_ctx_t *hashcat_ctx) } } + // we need this check to avoid integer overflow + #if defined (_WIN) + if (sec_etc > 100000000) + { + sec_etc = 100000000; + } + #endif + struct tm *tmp; #if defined (_WIN)