diff options
author | djm@openbsd.org <djm@openbsd.org> | 2016-08-28 22:28:12 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-08-29 11:20:45 +1000 |
commit | dc664d1bd0fc91b24406a3e9575b81c285b8342b (patch) | |
tree | 472063f0b2100dcbf4553537ce5682a0334a329e /sshd.c | |
parent | 5bcc1e2769f7d6927d41daf0719a9446ceab8dd7 (diff) |
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
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshd.c,v 1.474 2016/08/19 03:18:07 djm Exp $ */ | 1 | /* $OpenBSD: sshd.c,v 1.475 2016/08/28 22:28:12 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 |
@@ -1313,8 +1313,8 @@ check_ip_options(struct ssh *ssh) | |||
1313 | #ifdef IP_OPTIONS | 1313 | #ifdef IP_OPTIONS |
1314 | int sock_in = ssh_packet_get_connection_in(ssh); | 1314 | int sock_in = ssh_packet_get_connection_in(ssh); |
1315 | struct sockaddr_storage from; | 1315 | struct sockaddr_storage from; |
1316 | socklen_t option_size, i, fromlen = sizeof(from); | ||
1317 | u_char opts[200]; | 1316 | u_char opts[200]; |
1317 | socklen_t i, option_size = sizeof(opts), fromlen = sizeof(from); | ||
1318 | char text[sizeof(opts) * 3 + 1]; | 1318 | char text[sizeof(opts) * 3 + 1]; |
1319 | 1319 | ||
1320 | memset(&from, 0, sizeof(from)); | 1320 | memset(&from, 0, sizeof(from)); |