summaryrefslogtreecommitdiffstats
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/openssl/apps/passwd.c b/crypto/openssl/apps/passwd.c
index 6851a99..533b469 100644
--- a/crypto/openssl/apps/passwd.c
+++ b/crypto/openssl/apps/passwd.c
@@ -315,7 +315,7 @@ static char *md5crypt(const char *passwd, const char *magic, const char *salt)
strncat(out_buf, "$", 1);
strncat(out_buf, salt, 8);
assert(strlen(out_buf) <= 6 + 8); /* "$apr1$..salt.." */
- salt_out = out_buf + 6;
+ salt_out = out_buf + 2 + strlen(magic);
salt_len = strlen(salt_out);
assert(salt_len <= 8);
OpenPOWER on IntegriCloud