diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-05-13 13:48:59 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-05-13 13:48:59 +0000 |
commit | 58ef6271d72e476189d62ea9e8e24508c609a463 (patch) | |
tree | 7bfe3b8798ce61784f164bac7d9c82d15b78473d /src/crypt.c | |
parent | a7e06060c328e05c071ef2af87a9a34331128c65 (diff) | |
download | gnutls-58ef6271d72e476189d62ea9e8e24508c609a463.tar.gz |
minor updates and fixes
Diffstat (limited to 'src/crypt.c')
-rw-r--r-- | src/crypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypt.c b/src/crypt.c index ec91803fb6..962022a49e 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -102,7 +102,7 @@ int verify_passwd(char *conffile, char *file, char *username, char *passwd) && (i < sizeof(line))) { i++; } - if (strncmp(username, line, strlen(username)) == 0) { + if (strncmp(username, line, (i>strlen(username))?i:strlen(username)) == 0) { if (gnutls_crypt_vrfy (username, passwd, &line[++i], g, n) == 0) { fprintf(stderr, "Password verified\n"); |