summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/passwd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/passwd.c b/common/passwd.c
index 4408e02..217fa0c 100644
--- a/common/passwd.c
+++ b/common/passwd.c
@@ -327,7 +327,8 @@ inline char *sha512_crypt_r(const char *key, const char *salt, size_t maxrounds_
/* Create byte sequence P. */
cp = p_bytes = alloca (key_len);
for (cnt = key_len; cnt >= 64; cnt -= 64) {
- cp = mempcpy (cp, temp_result, 64);
+ cp = memcpy (cp, temp_result, 64);
+ cp += 64;
}
memcpy (cp, temp_result, cnt);
@@ -345,7 +346,8 @@ inline char *sha512_crypt_r(const char *key, const char *salt, size_t maxrounds_
/* Create byte sequence S. */
cp = s_bytes = alloca (salt_len);
for (cnt = salt_len; cnt >= 64; cnt -= 64) {
- cp = mempcpy (cp, temp_result, 64);
+ cp = memcpy (cp, temp_result, 64);
+ cp += 64;
}
memcpy (cp, temp_result, cnt);
@@ -386,7 +388,7 @@ inline char *sha512_crypt_r(const char *key, const char *salt, size_t maxrounds_
/* Now we can construct the result string. It consists of three
parts. */
- cp = __stpncpy (buffer, salt, MIN ((size_t) MAX (0, buflen), salt_len));
+ cp = stpncpy (buffer, salt, MIN ((size_t) MAX (0, buflen), salt_len));
buflen -= MIN ((size_t) MAX (0, buflen), salt_len);
b64_from_24bit (alt_result[0], alt_result[21], alt_result[42], 4);