From 25540494d6bb296aa7386a4bf2b7aea994772cee Mon Sep 17 00:00:00 2001 From: jsteube Date: Sat, 23 Feb 2019 23:46:10 +0100 Subject: [PATCH] Fixed -m 9100 base64 encoded hash output --- src/modules/module_09100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/module_09100.c b/src/modules/module_09100.c index c2b90a559..02fd18c06 100644 --- a/src/modules/module_09100.c +++ b/src/modules/module_09100.c @@ -179,9 +179,9 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE char tmp_buf[64]; - base64_encode (int_to_lotus64, (const u8 *) buf, 36, (u8 *) tmp_buf); + const int tmp_len = base64_encode (int_to_lotus64, (const u8 *) buf, 36, (u8 *) tmp_buf); - tmp_buf[49] = 0; + tmp_buf[tmp_len] = 0; const int line_len = snprintf (line_buf, line_size, "(H%s)", tmp_buf);