mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-23 08:38:09 +00:00
Fix integer overflow in status.c
This commit is contained in:
parent
655c3881f3
commit
6b96146e0f
16
src/status.c
16
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)
|
||||
|
Loading…
Reference in New Issue
Block a user