1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-30 03:48:17 +00:00

Fix wrong usage of ctime_r()

This commit is contained in:
Gabriele Gristina 2016-12-03 14:59:35 +01:00
parent a9a45ca80e
commit 134922ba7a
2 changed files with 7 additions and 7 deletions

View File

@ -844,9 +844,9 @@ char *status_get_time_started_absolute (const hashcat_ctx_t *hashcat_ctx)
const time_t time_start = status_ctx->runtime_start; const time_t time_start = status_ctx->runtime_start;
char buf; char buf[32] = { 0 };
char *start = ctime_r (&time_start, &buf); char *start = ctime_r (&time_start, buf);
const size_t start_len = strlen (start); const size_t start_len = strlen (start);
@ -936,9 +936,9 @@ char *status_get_time_estimated_absolute (const hashcat_ctx_t *hashcat_ctx)
now += sec_etc; now += sec_etc;
char buf; char buf[32] = { 0 };
char *etc = ctime_r (&now, &buf); char *etc = ctime_r (&now, buf);
const size_t etc_len = strlen (etc); const size_t etc_len = strlen (etc);

View File

@ -70,10 +70,10 @@ void goodbye_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const
if (user_options->show == true) return; if (user_options->show == true) return;
if (user_options->left == true) return; if (user_options->left == true) return;
char start_buf, stop_buf; char start_buf[32], stop_buf[32];
event_log_info_nn (hashcat_ctx, "Started: %s", ctime_r (&proc_start, &start_buf)); event_log_info_nn (hashcat_ctx, "Started: %s", ctime_r (&proc_start, start_buf));
event_log_info_nn (hashcat_ctx, "Stopped: %s", ctime_r (&proc_stop, &stop_buf)); event_log_info_nn (hashcat_ctx, "Stopped: %s", ctime_r (&proc_stop, stop_buf));
} }
int setup_console () int setup_console ()