summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ssh.c4
-rw-r--r--sshconnect.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ssh.c b/ssh.c
index cceb36e83..38e2b6674 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.429 2015/10/25 23:42:00 dtucker Exp $ */ 1/* $OpenBSD: ssh.c,v 1.430 2015/11/19 08:23:27 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1096,6 +1096,8 @@ main(int ac, char **av)
1096 "disabling"); 1096 "disabling");
1097 options.update_hostkeys = 0; 1097 options.update_hostkeys = 0;
1098 } 1098 }
1099 if (options.connection_attempts <= 0)
1100 fatal("Invalid number of ConnectionAttempts");
1099#ifndef HAVE_CYGWIN 1101#ifndef HAVE_CYGWIN
1100 if (original_effective_uid != 0) 1102 if (original_effective_uid != 0)
1101 options.use_privileged_port = 0; 1103 options.use_privileged_port = 0;
diff --git a/sshconnect.c b/sshconnect.c
index 1507934d8..b2c878a50 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.267 2015/11/19 01:09:38 djm Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.268 2015/11/19 08:23:27 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -434,6 +434,8 @@ ssh_connect_direct(const char *host, struct addrinfo *aitop,
434 struct addrinfo *ai; 434 struct addrinfo *ai;
435 435
436 debug2("%s: needpriv %d", __func__, needpriv); 436 debug2("%s: needpriv %d", __func__, needpriv);
437 memset(ntop, 0, sizeof(ntop));
438 memset(strport, 0, sizeof(strport));
437 439
438 for (attempt = 0; attempt < connection_attempts; attempt++) { 440 for (attempt = 0; attempt < connection_attempts; attempt++) {
439 if (attempt > 0) { 441 if (attempt > 0) {