[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
segfault by ldappasswd -A -S (ITS#714)
Full_Name: Fumitoshi UKAI
Version: 2.0.1
OS: Debian GNU/Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (202.33.250.145)
"ldappasswd -A -S" will segfault.
This patch fixes this problem.
--- clients/tools/ldappasswd.c.orig Sun Aug 27 02:04:34 2000
+++ clients/tools/ldappasswd.c Wed Sep 6 18:06:51 2000
@@ -507,10 +507,10 @@
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" );