summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2016-12-07 23:29:42 +0000
committerglebius <glebius@FreeBSD.org>2016-12-07 23:29:42 +0000
commitb416700da72fd8eab0a75d60f0634e254cbb9347 (patch)
tree953fb5ff3b9f37eb695d1b2877f782162f787198
parenta78b02757b69caee4861346847156dd77f0c2e21 (diff)
downloadFreeBSD-src-b416700da72fd8eab0a75d60f0634e254cbb9347.zip
FreeBSD-src-b416700da72fd8eab0a75d60f0634e254cbb9347.tar.gz
Merge r309688: address regressions in SA-16:37.libc.
PR: 215105 Submitted by: <jtd2004a sbcglobal.net> Approved by: so
-rw-r--r--UPDATING4
-rw-r--r--lib/libc/net/linkaddr.c11
-rw-r--r--sys/conf/newvers.sh2
3 files changed, 10 insertions, 7 deletions
diff --git a/UPDATING b/UPDATING
index 56f19c9..e397a54 100644
--- a/UPDATING
+++ b/UPDATING
@@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to
the tip of head, and then rebuild without this option. The bootstrap process
from older version of current across the gcc/clang cutover is a bit fragile.
+20161208 p5 FreeBSD-SA-16:37.libc [revised]
+
+ Fix regressions introduced by SA-16:37.libc.
+
20161206 p4 FreeBSD-SA-16:36.telnetd
FreeBSD-SA-16:37.libc
FreeBSD-SA-16:38.bhyve
diff --git a/lib/libc/net/linkaddr.c b/lib/libc/net/linkaddr.c
index c62b9f9..9432a53 100644
--- a/lib/libc/net/linkaddr.c
+++ b/lib/libc/net/linkaddr.c
@@ -125,7 +125,7 @@ link_ntoa(const struct sockaddr_dl *sdl)
static char obuf[64];
_Static_assert(sizeof(obuf) >= IFNAMSIZ + 20, "obuf is too small");
char *out;
- const char *in, *inlim;
+ const u_char *in, *inlim;
int namelen, i, rem;
namelen = (sdl->sdl_nlen <= IFNAMSIZ) ? sdl->sdl_nlen : IFNAMSIZ;
@@ -142,11 +142,11 @@ link_ntoa(const struct sockaddr_dl *sdl)
}
}
- in = (const char *)sdl->sdl_data + sdl->sdl_nlen;
+ in = (const u_char *)sdl->sdl_data + sdl->sdl_nlen;
inlim = in + sdl->sdl_alen;
while (in < inlim && rem > 1) {
- if (in != (const char *)sdl->sdl_data + sdl->sdl_nlen) {
+ if (in != (const u_char *)sdl->sdl_data + sdl->sdl_nlen) {
*out++ = '.';
rem--;
}
@@ -154,15 +154,14 @@ link_ntoa(const struct sockaddr_dl *sdl)
if (i > 0xf) {
if (rem < 3)
break;
+ *out++ = hexlist[i >> 4];
*out++ = hexlist[i & 0xf];
- i >>= 4;
- *out++ = hexlist[i];
rem -= 2;
} else {
if (rem < 2)
break;
*out++ = hexlist[i];
- rem++;
+ rem--;
}
}
*out = 0;
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 78509dd..2e7a09d 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="11.0"
-BRANCH="RELEASE-p4"
+BRANCH="RELEASE-p5"
if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi
OpenPOWER on IntegriCloud