From: Gabriele 'matrix' Gristina Date: Sun, 17 Jan 2016 17:52:25 +0000 (+0100) Subject: Fixed a buffer overflow in ascii_digest for hash type 8300 X-Git-Tag: v3.00-beta~485^2^2~1 X-Git-Url: https://www.flypig.org.uk/git/?a=commitdiff_plain;h=e9bc4caed371f6038685d287952ff26279eb4a41;p=hashcat.git Fixed a buffer overflow in ascii_digest for hash type 8300 --- diff --git a/src/shared.c b/src/shared.c index ef29ce4..9af47ba 100644 --- a/src/shared.c +++ b/src/shared.c @@ -7109,9 +7109,7 @@ void ascii_digest (char out_buf[4096], uint salt_pos, uint digest_pos) } else if (hash_mode == 8300) { - // todo - - char digest_buf_c[33]; + char digest_buf_c[56] = { 0 }; base32_encode (int_to_itoa32, (const u8 *) digest_buf, 32, (u8 *) digest_buf_c); @@ -7121,7 +7119,7 @@ void ascii_digest (char out_buf[4096], uint salt_pos, uint digest_pos) const uint salt_pc_len = salt.salt_buf_pc[7]; // what a hack - char domain_buf_c[33]; + char domain_buf_c[33] = { 0 }; memcpy (domain_buf_c, (char *) salt.salt_buf_pc, salt_pc_len);