From 3adec86fcc796c4dd1610b533673eda8300bbbfa Mon Sep 17 00:00:00 2001 From: jsteube Date: Sat, 12 Jan 2019 22:18:49 +0100 Subject: [PATCH] Fix md5crypt encoder --- modules/module_00500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/module_00500.c b/modules/module_00500.c index 58ecfedc0..9cb2e9eff 100644 --- a/modules/module_00500.c +++ b/modules/module_00500.c @@ -220,11 +220,11 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE if (salt->salt_iter == ROUNDS_MD5CRYPT) { - line_len = snprintf (line_buf, line_len, "$1$%s$%s", (char *) salt->salt_buf, tmp); + line_len = snprintf (line_buf, line_size, "$1$%s$%s", (char *) salt->salt_buf, tmp); } else { - line_len = snprintf (line_buf, line_len, "$1$rounds=%u$%s$%s", salt->salt_iter, (char *) salt->salt_buf, tmp); + line_len = snprintf (line_buf, line_size, "$1$rounds=%u$%s$%s", salt->salt_iter, (char *) salt->salt_buf, tmp); } return line_len;