Fix ITS#1497 use strcmp instead of strncmp

This commit is contained in:
Howard Chu 2001-12-17 21:56:24 +00:00
parent b64a425755
commit 63d4d0eb1e
2 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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;
}