summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2008-07-12 04:52:50 +0000
committerdjm <djm@openbsd.org>2008-07-12 04:52:50 +0000
commit674e26608576f565fe9e9ebcc5c54d0032bc6f6d (patch)
tree70ba3dede53eaf0b249e927aa29797f6cbfff2db
parentIf there is a 100baseT4 connection then fall through so as to (diff)
downloadwireguard-openbsd-674e26608576f565fe9e9ebcc5c54d0032bc6f6d.tar.xz
wireguard-openbsd-674e26608576f565fe9e9ebcc5c54d0032bc6f6d.zip
unbreak; move clearing of cctx struct to before first use
reported by dkrause@
-rw-r--r--usr.bin/ssh/channels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 3fdf8471898..57e10301f68 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.283 2008/07/10 18:05:58 markus Exp $ */
+/* $OpenBSD: channels.c,v 1.284 2008/07/12 04:52:50 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2837,6 +2837,7 @@ connect_to(const char *host, u_short port, char *ctype, char *rname)
struct channel_connect cctx;
Channel *c;
+ memset(&cctx, 0, sizeof(cctx));
memset(&hints, 0, sizeof(hints));
hints.ai_family = IPv4or6;
hints.ai_socktype = SOCK_STREAM;
@@ -2847,7 +2848,6 @@ connect_to(const char *host, u_short port, char *ctype, char *rname)
return NULL;
}
- memset(&cctx, 0, sizeof(cctx));
cctx.host = xstrdup(host);
cctx.port = port;
cctx.ai = cctx.aitop;