]> git.sur5r.net Git - openldap/commitdiff
segfault by ldappasswd -A -S (ITS#714) fix
authorKurt Zeilenga <kurt@openldap.org>
Wed, 6 Sep 2000 18:28:15 +0000 (18:28 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 6 Sep 2000 18:28:15 +0000 (18:28 +0000)
suggested by Fumitoshi UKAI <ukai@debian.or.jp>

clients/tools/ldappasswd.c

index 9a6cb8838a5ef16903122385c803cf656b051269..03fe88bef4cabc0fe4efcbc5dcf5fd72be2dcc3d 100644 (file)
@@ -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" );