From: Kurt Zeilenga Date: Wed, 6 Sep 2000 18:28:15 +0000 (+0000) Subject: segfault by ldappasswd -A -S (ITS#714) fix X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2091 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=70f28f1ba4de8662040aa4783a10e631a50bb359;p=openldap segfault by ldappasswd -A -S (ITS#714) fix suggested by Fumitoshi UKAI --- diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 9a6cb8838a..03fe88bef4 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -507,10 +507,10 @@ main( int argc, char *argv[] ) if( want_oldpw && oldpw == NULL ) { /* prompt for old password */ char *ckoldpw; - newpw = strdup(getpassphrase("Old password: ")); + oldpw = strdup(getpassphrase("Old password: ")); ckoldpw = getpassphrase("Re-enter old password: "); - if( newpw== NULL || ckoldpw == NULL || + if( oldpw== NULL || ckoldpw == NULL || strncmp( oldpw, ckoldpw, strlen(oldpw) )) { fprintf( stderr, "passwords do not match\n" );