diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | addrmatch.c | 6 | ||||
-rw-r--r-- | canohost.c | 5 |
3 files changed, 12 insertions, 7 deletions
@@ -6,7 +6,13 @@ | |||
6 | - dtucker@cvs.openbsd.org 2014/01/18 09:36:26 | 6 | - dtucker@cvs.openbsd.org 2014/01/18 09:36:26 |
7 | [session.c] | 7 | [session.c] |
8 | explicitly define USE_PIPES to 1 to prevent redefinition warnings in | 8 | explicitly define USE_PIPES to 1 to prevent redefinition warnings in |
9 | portable on platforms that use pipes for everything. | 9 | portable on platforms that use pipes for everything. From vinschen at |
10 | redhat. | ||
11 | - dtucker@cvs.openbsd.org 2014/01/19 04:17:29 | ||
12 | [canohost.c addrmatch.c] | ||
13 | Cast socklen_t when comparing to size_t and use socklen_t to iterate over | ||
14 | the ip options, both to prevent signed/unsigned comparison warnings. | ||
15 | Patch from vinschen at redhat via portable openssh, begrudging ok deraadt. | ||
10 | 16 | ||
11 | 20140118 | 17 | 20140118 |
12 | - (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin. Patch | 18 | - (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin. Patch |
diff --git a/addrmatch.c b/addrmatch.c index fb6de92e7..649de4139 100644 --- a/addrmatch.c +++ b/addrmatch.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: addrmatch.c,v 1.7 2013/05/17 00:13:13 djm Exp $ */ | 1 | /* $OpenBSD: addrmatch.c,v 1.8 2014/01/19 04:17:29 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org> | 4 | * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org> |
@@ -88,13 +88,13 @@ addr_sa_to_xaddr(struct sockaddr *sa, socklen_t slen, struct xaddr *xa) | |||
88 | 88 | ||
89 | switch (sa->sa_family) { | 89 | switch (sa->sa_family) { |
90 | case AF_INET: | 90 | case AF_INET: |
91 | if (slen < sizeof(*in4)) | 91 | if ((size_t)slen < sizeof(*in4)) |
92 | return -1; | 92 | return -1; |
93 | xa->af = AF_INET; | 93 | xa->af = AF_INET; |
94 | memcpy(&xa->v4, &in4->sin_addr, sizeof(xa->v4)); | 94 | memcpy(&xa->v4, &in4->sin_addr, sizeof(xa->v4)); |
95 | break; | 95 | break; |
96 | case AF_INET6: | 96 | case AF_INET6: |
97 | if (slen < sizeof(*in6)) | 97 | if ((size_t)slen < sizeof(*in6)) |
98 | return -1; | 98 | return -1; |
99 | xa->af = AF_INET6; | 99 | xa->af = AF_INET6; |
100 | memcpy(&xa->v6, &in6->sin6_addr, sizeof(xa->v6)); | 100 | memcpy(&xa->v6, &in6->sin6_addr, sizeof(xa->v6)); |
diff --git a/canohost.c b/canohost.c index 2e5a0b86e..a19a60cda 100644 --- a/canohost.c +++ b/canohost.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: canohost.c,v 1.69 2013/11/20 20:54:10 deraadt Exp $ */ | 1 | /* $OpenBSD: canohost.c,v 1.70 2014/01/19 04:17:29 dtucker 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 |
@@ -154,8 +154,7 @@ check_ip_options(int sock, char *ipaddr) | |||
154 | #ifdef IP_OPTIONS | 154 | #ifdef IP_OPTIONS |
155 | u_char options[200]; | 155 | u_char options[200]; |
156 | char text[sizeof(options) * 3 + 1]; | 156 | char text[sizeof(options) * 3 + 1]; |
157 | socklen_t option_size; | 157 | socklen_t option_size, i; |
158 | u_int i; | ||
159 | int ipproto; | 158 | int ipproto; |
160 | struct protoent *ip; | 159 | struct protoent *ip; |
161 | 160 | ||