1
0
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:
jsteube 2016-10-21 00:28:14 +02:00
parent 655c3881f3
commit 6b96146e0f

View File

@ -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)