diff options
author | 2005-05-25 07:22:36 +0000 | |
---|---|---|
committer | 2005-05-25 07:22:36 +0000 | |
commit | 233a4edf392062bbc8807aa274ff82fafa812e75 (patch) | |
tree | 30576e3b9d025031200adcf536589b39fb908a72 /lib/libssl/src | |
parent | add cvs_comment_lookup() and a suffix -> comment leader lookup table (diff) | |
download | wireguard-openbsd-233a4edf392062bbc8807aa274ff82fafa812e75.tar.xz wireguard-openbsd-233a4edf392062bbc8807aa274ff82fafa812e75.zip |
avoid spurious ld evil string func warning, spotted by david@;
feedback & ok avsm@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/apps/passwd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libssl/src/apps/passwd.c b/lib/libssl/src/apps/passwd.c index 3ad91d89d6a..d78716d1b5e 100644 --- a/lib/libssl/src/apps/passwd.c +++ b/lib/libssl/src/apps/passwd.c @@ -320,9 +320,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); + strlcat(out_buf, magic, sizeof(out_buf)); + strlcat(out_buf, "$", sizeof(out_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); |