1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-13 19:28:56 +00:00

Limit exec_hexify() to max 32 chars

This commit is contained in:
jsteube 2016-10-04 23:25:35 +02:00
parent 5b2b00ed7d
commit 72fdc6a527

View File

@ -22,7 +22,9 @@ bool need_hexify (const u8 *buf, const int len)
void exec_hexify (const u8 *buf, const int len, u8 *out)
{
for (int i = len - 1, j = i * 2; i >= 0; i -= 1, j -= 2)
const int max_len = (len >= 32) ? 32 : len;
for (int i = max_len - 1, j = i * 2; i >= 0; i -= 1, j -= 2)
{
const u8 v = buf[i];