diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-25 21:04:03 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-25 21:04:03 +0000 |
commit | 8436143b1190862baa4fcb67d29042b946d1a14b (patch) | |
tree | 58b86150b5d75c641301149f3f94603630ca5923 /usr.bin | |
parent | c0b77c474191b66848df54c5a63181cf773fb2e9 (diff) |
simplify num_identity_files handling
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/ssh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index ad72bd1ac2c..003bb39fbee 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.167 2002/03/25 17:34:27 markus Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.168 2002/03/25 21:04:02 markus Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -1177,8 +1177,6 @@ load_public_identity_files(void) int count = 0; for (i = 0; keys[i] != NULL; i++) { count++; - if (options.num_identity_files + 1 > SSH_MAX_IDENTITY_FILES) - options.num_identity_files = SSH_MAX_IDENTITY_FILES - 1; memmove(&options.identity_files[1], &options.identity_files[0], sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1)); memmove(&options.identity_keys[1], &options.identity_keys[0], @@ -1187,6 +1185,8 @@ load_public_identity_files(void) options.identity_keys[0] = keys[i]; options.identity_files[0] = xstrdup("smartcard key");; } + if (options.num_identity_files > SSH_MAX_IDENTITY_FILES) + options.num_identity_files = SSH_MAX_IDENTITY_FILES; i = count; xfree(keys); } |