summaryrefslogtreecommitdiff
path: root/ext/standard/crypt_sha512.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/crypt_sha512.c')
-rw-r--r--ext/standard/crypt_sha512.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c
index c3e4debe63..cbc97a328c 100644
--- a/ext/standard/crypt_sha512.c
+++ b/ext/standard/crypt_sha512.c
@@ -431,8 +431,8 @@ php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
if ((salt - (char *) 0) % __alignof__ (uint64_t) != 0) {
char *tmp = (char *) alloca(salt_len + 1 + __alignof__(uint64_t));
- tmp[salt_len] = 0;
salt = copied_salt = memcpy(tmp + __alignof__(uint64_t) - (tmp - (char *) 0) % __alignof__(uint64_t), salt, salt_len);
+ copied_salt[salt_len] = 0;
}
/* Prepare for the real work. */