Author: glebius
Date: Wed Dec  7 23:34:06 2016
New Revision: 309696
URL: https://svnweb.freebsd.org/changeset/base/309696

Log:
  Merge r309688: address regressions in SA-16:37.libc.
  
  PR:           215105
  Submitted by: <jtd2004a sbcglobal.net>
  Approved by:  so

Modified:
  releng/10.1/UPDATING
  releng/10.1/lib/libc/net/linkaddr.c
  releng/10.1/sys/conf/newvers.sh
Directory Properties:
  releng/10.1/   (props changed)

Modified: releng/10.1/UPDATING
==============================================================================
--- releng/10.1/UPDATING        Wed Dec  7 23:33:59 2016        (r309695)
+++ releng/10.1/UPDATING        Wed Dec  7 23:34:06 2016        (r309696)
@@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20161208       p44     FreeBSD-SA-16:37.libc [revised]
+
+       Fix regressions introduced by SA-16:37.libc.
+
 20161206       p43     FreeBSD-SA-16:36.telnetd
                        FreeBSD-SA-16:37.libc
                        FreeBSD-SA-16:38.bhyve

Modified: releng/10.1/lib/libc/net/linkaddr.c
==============================================================================
--- releng/10.1/lib/libc/net/linkaddr.c Wed Dec  7 23:33:59 2016        
(r309695)
+++ releng/10.1/lib/libc/net/linkaddr.c Wed Dec  7 23:34:06 2016        
(r309696)
@@ -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;

Modified: releng/10.1/sys/conf/newvers.sh
==============================================================================
--- releng/10.1/sys/conf/newvers.sh     Wed Dec  7 23:33:59 2016        
(r309695)
+++ releng/10.1/sys/conf/newvers.sh     Wed Dec  7 23:34:06 2016        
(r309696)
@@ -32,7 +32,7 @@
 
 TYPE="FreeBSD"
 REVISION="10.1"
-BRANCH="RELEASE-p43"
+BRANCH="RELEASE-p44"
 if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
        BRANCH=${BRANCH_OVERRIDE}
 fi
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to