diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2016-08-28 22:28:13 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2016-08-28 22:28:13 +0000 |
commit | 2f9af1dd2bee3a9d10a3fe1987ea171b2aebb3d3 (patch) | |
tree | c694e5351c8a44732cee57215dfbf6f5aee898da /usr.bin | |
parent | cf2c825baad4dbe18efce156321eb17692efad53 (diff) |
fix uninitialised optlen in getsockopt() call; harmless on Unix/BSD
but potentially crashy on Cygwin. Reported by James Slepicka
ok deraadt@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sshd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 2a2d149ad02..a6429c8eec3 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.474 2016/08/19 03:18:07 djm Exp $ */ +/* $OpenBSD: sshd.c,v 1.475 2016/08/28 22:28:12 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1243,8 +1243,8 @@ check_ip_options(struct ssh *ssh) { 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)); |