summaryrefslogtreecommitdiffstats
path: root/apps/passwd.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2001-01-19 07:37:56 +0000
committerBodo Möller <bodo@openssl.org>2001-01-19 07:37:56 +0000
commit57108f0ad573347af91681568dc790f606fd0a5b (patch)
tree7f34df875368992c20325008cd05997687e84981 /apps/passwd.c
parent73758d435bfcce06c5bcb58a54e5c2ddde47bed1 (diff)
Fix openssl passwd -1
Diffstat (limited to 'apps/passwd.c')
-rw-r--r--apps/passwd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/passwd.c b/apps/passwd.c
index c92ff40beb..7cfd158e88 100644
--- a/apps/passwd.c
+++ b/apps/passwd.c
@@ -320,7 +320,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);