aboutsummaryrefslogtreecommitdiffstats
path: root/addrmatch.c
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-03-30 14:49:51 -0700
committerAdam Langley <agl@google.com>2015-04-07 17:50:50 -0700
commitd059297112922cabb0c674840589be8db821fd9a (patch)
tree9c2045d28ec1c8594090f38bc32e9f523dc6c68d /addrmatch.c
parentf5c67b478bef9992de9e9ec91ce10af4f6205e0d (diff)
downloadplatform_external_openssh-d059297112922cabb0c674840589be8db821fd9a.tar.gz
platform_external_openssh-d059297112922cabb0c674840589be8db821fd9a.tar.bz2
platform_external_openssh-d059297112922cabb0c674840589be8db821fd9a.zip
external/openssh: update to 6.8p1.
In preparation for some updates to external/openssh to make it work with BoringSSL, this change updates the code to a recent version. The current version (5.9p1) is coming up on four years old now. * Confirmed that f5c67b478bef9992de9e9ec91ce10af4f6205e0d matches OpenSSH 5.9p1 exactly (save for the removal of the scard subdirectory). * Downloaded openssh-6.8p1.tar.gz (SHA256: 3ff64ce73ee124480b5bf767b9830d7d3c03bbcb6abe716b78f0192c37ce160e) and verified with PGP signature. (I've verified Damien's key in person previously.) * Applied changes between f5c67b478bef9992de9e9ec91ce10af4f6205e0d and OpenSSH 5.9p1 to 6.8p1 and updated the build as best I can. The ugliest change is probably the duplication of umac.c to umac128.c because Android conditionally compiles that file twice. See the comment in those files. Change-Id: I63cb07a8118afb5a377f116087a0882914cea486
Diffstat (limited to 'addrmatch.c')
-rw-r--r--addrmatch.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/addrmatch.c b/addrmatch.c
index 5b6773cc..c4431463 100644
--- a/addrmatch.c
+++ b/addrmatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: addrmatch.c,v 1.5 2010/02/26 20:29:54 djm Exp $ */
+/* $OpenBSD: addrmatch.c,v 1.9 2014/01/19 11:21:51 dtucker Exp $ */
/*
* 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)
switch (sa->sa_family) {
case AF_INET:
- if (slen < sizeof(*in4))
+ if (slen < (socklen_t)sizeof(*in4))
return -1;
xa->af = AF_INET;
memcpy(&xa->v4, &in4->sin_addr, sizeof(xa->v4));
break;
case AF_INET6:
- if (slen < sizeof(*in6))
+ if (slen < (socklen_t)sizeof(*in6))
return -1;
xa->af = AF_INET6;
memcpy(&xa->v6, &in6->sin6_addr, sizeof(xa->v6));
@@ -318,7 +318,7 @@ addr_pton_cidr(const char *p, struct xaddr *n, u_int *l)
char addrbuf[64], *mp, *cp;
/* Don't modify argument */
- if (p == NULL || strlcpy(addrbuf, p, sizeof(addrbuf)) > sizeof(addrbuf))
+ if (p == NULL || strlcpy(addrbuf, p, sizeof(addrbuf)) >= sizeof(addrbuf))
return -1;
if ((mp = strchr(addrbuf, '/')) != NULL) {
@@ -420,7 +420,7 @@ addr_match_list(const char *addr, const char *_list)
goto foundit;
}
}
- xfree(o);
+ free(o);
return ret;
}
@@ -494,7 +494,7 @@ addr_match_cidr_list(const char *addr, const char *_list)
continue;
}
}
- xfree(o);
+ free(o);
return ret;
}