summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-08-28 22:28:12 +0000
committerDamien Miller <djm@mindrot.org>2016-08-29 11:23:24 +1000
commit9295c18a4436ec98c67ad61fe3919522936c9ef1 (patch)
tree3dc7f46d6e6251bb9d3917bac6644b427be23c21
parent2f5a4de73ec9a9d10e447d94b31b6404dd2ddfed (diff)
upstream commitV_7_3
fix uninitialised optlen in getsockopt() call; harmless on Unix/BSD but potentially crashy on Cygwin. Reported by James Slepicka ok deraadt@ Upstream-ID: 1987ccee508ba5b18f016c85100d7ac3f70ff965
-rw-r--r--sshd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index 9fc829a9..e42e4674 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1486,8 +1486,8 @@ check_ip_options(struct ssh *ssh)
#ifdef IP_OPTIONS
int sock_in = ssh_packet_get_connection_in(ssh);
struct sockaddr_storage from;
- socklen_t option_size, i, fromlen = sizeof(from);
u_char opts[200];
+ socklen_t i, option_size = sizeof(opts), fromlen = sizeof(from);
char text[sizeof(opts) * 3 + 1];
memset(&from, 0, sizeof(from));