diff --git a/src/modules/module_30000.c b/src/modules/module_30000.c index 9ab9f9c63..3e10d5866 100644 --- a/src/modules/module_30000.c +++ b/src/modules/module_30000.c @@ -117,7 +117,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE u8 *out_buf = (u8 *) line_buf; - int out_len = snprintf((char *)out_buf, 4, "md5$"); + int out_len = snprintf ((char *) out_buf, line_size, "md5$"); out_len += generic_salt_encode (hashconfig, (const u8 *) salt->salt_buf, (const int) salt->salt_len, out_buf + out_len); diff --git a/src/modules/module_30120.c b/src/modules/module_30120.c index 523fa4439..1e591b7bd 100644 --- a/src/modules/module_30120.c +++ b/src/modules/module_30120.c @@ -177,7 +177,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE u8 *out_buf = (u8 *) line_buf; - int out_len = snprintf((char *)out_buf, 7, "sha256$"); + int out_len = snprintf ((char *) out_buf, line_size, "sha256$"); out_len += generic_salt_encode (hashconfig, (const u8 *) salt->salt_buf, (const int) salt->salt_len, out_buf + out_len);