From: Jens Steube Date: Thu, 31 Mar 2016 14:12:13 +0000 (+0200) Subject: Synchronize maximum output line size with input line size X-Git-Tag: v3.00-beta~160 X-Git-Url: https://www.flypig.org.uk/git/?a=commitdiff_plain;h=88fafeb92884078174d58582a474c76bccfa1264;p=hashcat.git Synchronize maximum output line size with input line size --- diff --git a/include/shared.h b/include/shared.h index 685a2bb..06ea4be 100644 --- a/include/shared.h +++ b/include/shared.h @@ -1333,7 +1333,7 @@ u32 get_random_num (const u32 min, const u32 max); u32 mydivc32 (const u32 dividend, const u32 divisor); u64 mydivc64 (const u64 dividend, const u64 divisor); -void ascii_digest (char out_buf[1024], uint salt_pos, uint digest_pos); +void ascii_digest (char *out_buf, uint salt_pos, uint digest_pos); void to_hccap_t (hccap_t *hccap, uint salt_pos, uint digest_pos); void format_speed_display (float val, char *buf, size_t len); diff --git a/src/oclHashcat.c b/src/oclHashcat.c index 9d78deb..2908154 100644 --- a/src/oclHashcat.c +++ b/src/oclHashcat.c @@ -1110,7 +1110,7 @@ void status_display () } else { - char out_buf[4096] = { 0 }; + char out_buf[HCBUFSIZ] = { 0 }; ascii_digest (out_buf, 0, 0); @@ -1130,8 +1130,8 @@ void status_display () { if (data.hash_mode == 3000) { - char out_buf1[4096] = { 0 }; - char out_buf2[4096] = { 0 }; + char out_buf1[32] = { 0 }; + char out_buf2[32] = { 0 }; ascii_digest (out_buf1, 0, 0); ascii_digest (out_buf2, 0, 1); @@ -1873,7 +1873,7 @@ static void check_hash (hc_device_param_t *device_param, const uint salt_pos, co // hash - char out_buf[4096] = { 0 }; + char out_buf[HCBUFSIZ] = { 0 }; ascii_digest (out_buf, salt_pos, digest_pos); @@ -2318,7 +2318,7 @@ static void save_hash () if (data.hash_mode != 2500) { - char out_buf[4096] = { 0 }; + char out_buf[HCBUFSIZ] = { 0 }; if (data.username == 1) { diff --git a/src/shared.c b/src/shared.c index aeb914f..3e374ff 100644 --- a/src/shared.c +++ b/src/shared.c @@ -5876,7 +5876,7 @@ char *strstatus (const uint devices_status) return ((char *) "Unknown"); } -void ascii_digest (char out_buf[4096], uint salt_pos, uint digest_pos) +void ascii_digest (char *out_buf, uint salt_pos, uint digest_pos) { uint hash_type = data.hash_type; uint hash_mode = data.hash_mode;