summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh.c b/ssh.c
index dd926b7e7..062e098fc 100644
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: ssh.c,v 1.167 2002/03/25 17:34:27 markus Exp $"); 42RCSID("$OpenBSD: ssh.c,v 1.168 2002/03/25 21:04:02 markus Exp $");
43 43
44#include <openssl/evp.h> 44#include <openssl/evp.h>
45#include <openssl/err.h> 45#include <openssl/err.h>
@@ -1197,8 +1197,6 @@ load_public_identity_files(void)
1197 int count = 0; 1197 int count = 0;
1198 for (i = 0; keys[i] != NULL; i++) { 1198 for (i = 0; keys[i] != NULL; i++) {
1199 count++; 1199 count++;
1200 if (options.num_identity_files + 1 > SSH_MAX_IDENTITY_FILES)
1201 options.num_identity_files = SSH_MAX_IDENTITY_FILES - 1;
1202 memmove(&options.identity_files[1], &options.identity_files[0], 1200 memmove(&options.identity_files[1], &options.identity_files[0],
1203 sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1)); 1201 sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1));
1204 memmove(&options.identity_keys[1], &options.identity_keys[0], 1202 memmove(&options.identity_keys[1], &options.identity_keys[0],
@@ -1207,6 +1205,8 @@ load_public_identity_files(void)
1207 options.identity_keys[0] = keys[i]; 1205 options.identity_keys[0] = keys[i];
1208 options.identity_files[0] = xstrdup("smartcard key");; 1206 options.identity_files[0] = xstrdup("smartcard key");;
1209 } 1207 }
1208 if (options.num_identity_files > SSH_MAX_IDENTITY_FILES)
1209 options.num_identity_files = SSH_MAX_IDENTITY_FILES;
1210 i = count; 1210 i = count;
1211 xfree(keys); 1211 xfree(keys);
1212 } 1212 }