X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fpasswd.c;h=ea2b089e24a73762fd027f997f5a34b5ef9e9487;hb=2006dd12d693499ecbf532748ecbb819868f6951;hp=6851a9927d310a53d4ef06bbd61eb44a30688377;hpb=645749ef98612340b11c4bf2ba856e1fa469912b;p=oweals%2Fopenssl.git diff --git a/apps/passwd.c b/apps/passwd.c index 6851a9927d..ea2b089e24 100644 --- a/apps/passwd.c +++ b/apps/passwd.c @@ -272,6 +272,7 @@ int MAIN(int argc, char **argv) } while (!done); } + ret = 0; err: ERR_print_errors(bio_err); @@ -315,7 +316,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);