From: djm@openbsd.org Date: Sun, 28 Aug 2016 22:28:12 +0000 (+0000) Subject: upstream commit X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV_7_3;p=thirdparty%2Fopenssh-portable.git upstream commit fix uninitialised optlen in getsockopt() call; harmless on Unix/BSD but potentially crashy on Cygwin. Reported by James Slepicka ok deraadt@ Upstream-ID: 1987ccee508ba5b18f016c85100d7ac3f70ff965 --- diff --git a/sshd.c b/sshd.c index 9fc829a91..e42e4674f 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));