Merge pull request #902 from matrix/ctime_r

Fix wrong usage of ctime_r()
pull/903/head
Jens Steube 8 years ago committed by GitHub
commit 1d01105b95

@ -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;
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);
@ -936,9 +936,9 @@ char *status_get_time_estimated_absolute (const hashcat_ctx_t *hashcat_ctx)
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);

@ -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->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, "Stopped: %s", ctime_r (&proc_stop, &stop_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));
}
int setup_console ()

Loading…
Cancel
Save