diff --git a/include/outfile.h b/include/outfile.h index 7201aad42..953f68a71 100644 --- a/include/outfile.h +++ b/include/outfile.h @@ -20,6 +20,6 @@ int outfile_init (hashcat_ctx_t *hashcat_ctx); void outfile_destroy (hashcat_ctx_t *hashcat_ctx); int outfile_write_open (hashcat_ctx_t *hashcat_ctx); void outfile_write_close (hashcat_ctx_t *hashcat_ctx); -int outfile_write (hashcat_ctx_t *hashcat_ctx, const char *out_buf, const int out_len, const unsigned char *plain_ptr, const u32 plain_len, const u64 crackpos, const unsigned char *username, const u32 user_len, const bool print_eol, char tmp_buf[HCBUFSIZ_LARGE]); +int outfile_write (hashcat_ctx_t *hashcat_ctx, const char *out_buf, const int out_len, const unsigned char *plain_ptr, const u32 plain_len, const u64 crackpos, const unsigned char *username, const u32 user_len, const bool print_eol, char *tmp_buf); #endif // _OUTFILE_H diff --git a/src/outfile.c b/src/outfile.c index bc18f4520..26c135657 100644 --- a/src/outfile.c +++ b/src/outfile.c @@ -550,7 +550,7 @@ void outfile_write_close (hashcat_ctx_t *hashcat_ctx) hc_fclose (&outfile_ctx->fp); } -int outfile_write (hashcat_ctx_t *hashcat_ctx, const char *out_buf, const int out_len, const unsigned char *plain_ptr, const u32 plain_len, const u64 crackpos, const unsigned char *username, const u32 user_len, const bool print_eol, char tmp_buf[HCBUFSIZ_LARGE]) +int outfile_write (hashcat_ctx_t *hashcat_ctx, const char *out_buf, const int out_len, const unsigned char *plain_ptr, const u32 plain_len, const u64 crackpos, const unsigned char *username, const u32 user_len, const bool print_eol, char *tmp_buf) { const hashconfig_t *hashconfig = hashcat_ctx->hashconfig; const user_options_t *user_options = hashcat_ctx->user_options; diff --git a/src/terminal.c b/src/terminal.c index ca9b3d563..644881ce2 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -636,7 +636,7 @@ void hash_info_single (hashcat_ctx_t *hashcat_ctx, user_options_t *user_options) if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false)) { - char tmp_buf[HCBUFSIZ_LARGE] = { 0 }; + char *tmp_buf = (char *) hcmalloc (HCBUFSIZ_LARGE); int tmp_len = 0; @@ -654,6 +654,8 @@ void hash_info_single (hashcat_ctx_t *hashcat_ctx, user_options_t *user_options) tmp_buf[tmp_len++] = 0; event_log_info (hashcat_ctx, " Example.Pass........: %s", tmp_buf); + + hcfree (tmp_buf); } else {