aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2016-12-07 23:35:15 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2016-12-07 23:35:15 +0000
commit8c7ff71d356bdceffa6cd5b5017c65d0d63d9abc (patch)
treefbc3371023e1d5cfd141ded1fb0cf94d15ae7abf
parenteb302dbc19f895b99b9ca7521d05389ee7559d73 (diff)
downloadsrc-8c7ff71d356bdceffa6cd5b5017c65d0d63d9abc.tar.gz
src-8c7ff71d356bdceffa6cd5b5017c65d0d63d9abc.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/9.3/; revision=309697
-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 874627a86667..a44009550ea5 100644
--- a/UPDATING
+++ b/UPDATING
@@ -11,6 +11,10 @@ handbook:
Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before running portupgrade.
+20161208 p52 FreeBSD-SA-16:37.libc [revised]
+
+ Fix regressions introduced by SA-16:37.libc.
+
20161206 p51 FreeBSD-SA-16:36.telnetd
FreeBSD-SA-16:37.libc
FreeBSD-EN-16:19.tzcode
diff --git a/lib/libc/net/linkaddr.c b/lib/libc/net/linkaddr.c
index 9b1da65450ec..5710871b92ad 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 460177f397f1..07b30c5f61ec 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="9.3"
-BRANCH="RELEASE-p51"
+BRANCH="RELEASE-p52"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi