diff --git a/include/common.h b/include/common.h index c57e2eb7a..39ea9016d 100644 --- a/include/common.h +++ b/include/common.h @@ -104,6 +104,7 @@ but this is nededed for VS compiler which doesn't have inline keyword but has __ #define SALT_MAX_OLD 51 #define HCBUFSIZ_TINY 0x1000 +#define HCBUFSIZ_SMALL 0x2000 #define HCBUFSIZ_LARGE 0xb0000 #define CPT_CACHE 0x20000 diff --git a/include/types.h b/include/types.h index e059ade34..7c1960147 100644 --- a/include/types.h +++ b/include/types.h @@ -1519,7 +1519,7 @@ typedef struct outfile_ctx typedef struct pot { - char plain_buf[HCBUFSIZ_TINY]; + char plain_buf[HCBUFSIZ_SMALL]; int plain_len; hash_t hash; @@ -1614,7 +1614,7 @@ typedef struct out { FILE *fp; - char buf[HCBUFSIZ_TINY]; + char buf[HCBUFSIZ_SMALL]; int len; } out_t; @@ -2180,11 +2180,11 @@ typedef struct hashlist_parse typedef struct event_ctx { - char old_buf[MAX_OLD_EVENTS][HCBUFSIZ_TINY]; + char old_buf[MAX_OLD_EVENTS][HCBUFSIZ_SMALL]; size_t old_len[MAX_OLD_EVENTS]; int old_cnt; - char msg_buf[HCBUFSIZ_TINY]; + char msg_buf[HCBUFSIZ_SMALL]; size_t msg_len; bool msg_newline; diff --git a/src/event.c b/src/event.c index 72532d94f..ab52ba974 100644 --- a/src/event.c +++ b/src/event.c @@ -91,7 +91,7 @@ size_t event_log_advice_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) va_start (ap, fmt); - event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1); + event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1); va_end (ap); } @@ -119,7 +119,7 @@ size_t event_log_info_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) va_start (ap, fmt); - event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1); + event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1); va_end (ap); } @@ -147,7 +147,7 @@ size_t event_log_warning_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) va_start (ap, fmt); - event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1); + event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1); va_end (ap); } @@ -175,7 +175,7 @@ size_t event_log_error_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) va_start (ap, fmt); - event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1); + event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1); va_end (ap); } @@ -203,7 +203,7 @@ size_t event_log_advice (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) va_start (ap, fmt); - event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1); + event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1); va_end (ap); } @@ -231,7 +231,7 @@ size_t event_log_info (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) va_start (ap, fmt); - event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1); + event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1); va_end (ap); } @@ -259,7 +259,7 @@ size_t event_log_warning (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) va_start (ap, fmt); - event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1); + event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1); va_end (ap); } @@ -287,7 +287,7 @@ size_t event_log_error (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) va_start (ap, fmt); - event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1); + event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1); va_end (ap); } diff --git a/src/potfile.c b/src/potfile.c index 2e5262a86..b3015e04e 100644 --- a/src/potfile.c +++ b/src/potfile.c @@ -836,7 +836,7 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx) if (is_collider_hex_password == true) { - u8 pass_unhexified[HCBUFSIZ_TINY] = { 0 }; + u8 pass_unhexified[HCBUFSIZ_SMALL] = { 0 }; const size_t pass_unhexified_len = exec_unhexify ((u8 *) hash->pw_buf, hash->pw_len, pass_unhexified, sizeof (pass_unhexified)); diff --git a/src/stdout.c b/src/stdout.c index 40bdd35d3..dd31d3034 100644 --- a/src/stdout.c +++ b/src/stdout.c @@ -44,7 +44,7 @@ static void out_push (out_t *out, const u8 *pw_buf, const int pw_len) #endif - if (out->len >= HCBUFSIZ_TINY - 300) + if (out->len >= HCBUFSIZ_SMALL - 300) { out_flush (out); }