aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2016-12-07 23:31:07 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2016-12-07 23:31:07 +0000
commit14f66fc8eab05ced7033c76918b773f372e8a267 (patch)
treeef8db65e9eb49511d7489b46fe81620bed611d1c
parent6cc6b6209e4425e2caf61835e9c58f1bc7544d5e (diff)
downloadsrc-14f66fc8eab05ced7033c76918b773f372e8a267.tar.gz
src-14f66fc8eab05ced7033c76918b773f372e8a267.zip
Merge r309688: address regressions in SA-16:37.libc.
PR: 215105 Submitted by: <jtd2004a sbcglobal.net> Approved by: so
Notes
Notes: svn path=/releng/10.3/; revision=309693
-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 2a5abe5dbe09..53be186166ed 100644
--- a/UPDATING
+++ b/UPDATING
@@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of
stable/10, and then rebuild without this option. The bootstrap process from
older version of current is a bit fragile.
+20161208 p14 FreeBSD-SA-16:37.libc [revised]
+
+ Fix regressions introduced by SA-16:37.libc.
+
20161206 p13 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 f14f22de279f..fec220a389a9 100644
--- a/lib/libc/net/linkaddr.c
+++ b/lib/libc/net/linkaddr.c
@@ -128,7 +128,7 @@ link_ntoa(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;
@@ -145,11 +145,11 @@ link_ntoa(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--;
}
@@ -157,15 +157,14 @@ link_ntoa(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 87777eb1185b..f421b060735e 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="10.3"
-BRANCH="RELEASE-p13"
+BRANCH="RELEASE-p14"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi