From 57108f0ad573347af91681568dc790f606fd0a5b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Fri, 19 Jan 2001 07:37:56 +0000 Subject: [PATCH] Fix openssl passwd -1 --- CHANGES | 3 +++ apps/passwd.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 59dc558f90..eeddf41840 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,9 @@ Changes between 0.9.6 and 0.9.7 [xx XXX 2000] + *) Fix 'openssl passwd -1'. + [Bodo Moeller] + *) Add summary printout to ocsp utility. The various functions which convert status values to strings have been renamed to: OCSP_response_status_str(), OCSP_cert_status_str() and 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); -- 2.25.1