diff options
author | Rich Salz <rsalz@akamai.com> | 2015-12-16 16:12:24 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-12-16 16:14:49 -0500 |
commit | 7644a9aef8932ed4d1c3f25ed776c997702982be (patch) | |
tree | d8f1e7fca20ad12683a1e2e52c92b6999ada23a6 /apps/passwd.c | |
parent | e4cf866322a4549c55153f9f135f9dadf4d3fc31 (diff) |
Rename some BUF_xxx to OPENSSL_xxx
Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen}
to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen}
Add #define's for the old names.
Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'apps/passwd.c')
-rw-r--r-- | apps/passwd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/passwd.c b/apps/passwd.c index 2a32111e9d..f0ab243580 100644 --- a/apps/passwd.c +++ b/apps/passwd.c @@ -314,9 +314,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); + OPENSSL_strlcat(out_buf, magic, sizeof out_buf); + OPENSSL_strlcat(out_buf, "$", sizeof out_buf); + OPENSSL_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); |