summaryrefslogtreecommitdiff
path: root/crypto/openssl/apps/passwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/apps/passwd.c')
-rw-r--r--crypto/openssl/apps/passwd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/openssl/apps/passwd.c b/crypto/openssl/apps/passwd.c
index 56e10ad3d8f1..718f0e0124dd 100644
--- a/crypto/openssl/apps/passwd.c
+++ b/crypto/openssl/apps/passwd.c
@@ -306,9 +306,9 @@ static char *md5crypt(const char *passwd, const char *magic, const char *salt)
out_buf[0] = '$';
out_buf[1] = 0;
assert(strlen(magic) <= 4); /* "1" or "apr1" */
- strncat(out_buf, magic, 4);
- strncat(out_buf, "$", 1);
- strncat(out_buf, salt, 8);
+ BUF_strlcat(out_buf, magic, sizeof(out_buf));
+ BUF_strlcat(out_buf, "$", sizeof(out_buf));
+ BUF_strlcat(out_buf, salt, sizeof(out_buf));
assert(strlen(out_buf) <= 6 + 8); /* "$apr1$..salt.." */
salt_out = out_buf + 2 + strlen(magic);
salt_len = strlen(salt_out);