mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
Fix ITS#1497 use strcmp instead of strncmp
This commit is contained in:
parent
b64a425755
commit
63d4d0eb1e
2 changed files with 3 additions and 3 deletions
|
|
@ -510,7 +510,7 @@ main( int argc, char *argv[] )
|
|||
ckoldpw = getpassphrase("Re-enter old password: ");
|
||||
|
||||
if( oldpw== NULL || ckoldpw == NULL ||
|
||||
strncmp( oldpw, ckoldpw, strlen(oldpw) ))
|
||||
strcmp( oldpw, ckoldpw ))
|
||||
{
|
||||
fprintf( stderr, "passwords do not match\n" );
|
||||
return EXIT_FAILURE;
|
||||
|
|
@ -524,7 +524,7 @@ main( int argc, char *argv[] )
|
|||
cknewpw = getpassphrase("Re-enter new password: ");
|
||||
|
||||
if( newpw== NULL || cknewpw == NULL ||
|
||||
strncmp( newpw, cknewpw, strlen(newpw) ))
|
||||
strcmp( newpw, cknewpw ))
|
||||
{
|
||||
fprintf( stderr, "passwords do not match\n" );
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ main( int argc, char *argv[] )
|
|||
newpw = strdup(getpassphrase("New password: "));
|
||||
cknewpw = getpassphrase("Re-enter new password: ");
|
||||
|
||||
if( strncmp( newpw, cknewpw, strlen(newpw) )) {
|
||||
if( strcmp( newpw, cknewpw )) {
|
||||
fprintf( stderr, "Password values do not match\n" );
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue