]> git.pld-linux.org Git - packages/glibc.git/commitdiff
- rel 2; few fixes from git auto/th/glibc-2.20-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 18 Sep 2014 13:32:07 +0000 (15:32 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 18 Sep 2014 13:32:07 +0000 (15:32 +0200)
glibc-git.patch [new file with mode: 0644]
glibc.spec

diff --git a/glibc-git.patch b/glibc-git.patch
new file mode 100644 (file)
index 0000000..a55596e
--- /dev/null
@@ -0,0 +1,136 @@
+commit 58b930ae216bfa98cd60212b954b07b9963d6d04
+Author: Siddhesh Poyarekar <siddhesh@redhat.com>
+Date:   Wed Sep 10 21:51:50 2014 +0530
+
+    Return failure in getnetgrent only when all netgroups have been searched (#17363)
+    
+    The netgroups lookup code fails when one of the groups in the search
+    tree is empty.  In such a case it only returns the leaves of the tree
+    after the blank netgroup.  This is because the line parser returns a
+    NOTFOUND status when the netgroup exists but is empty.  The
+    __getnetgrent_internal implementation needs to be fixed to try
+    remaining groups if the current group is entry.  This patch implements
+    this fix.  Tested on x86_64.
+    
+       [BZ #17363]
+       * inet/getnetgrent_r.c (__internal_getnetgrent_r): Try next
+       group if the current group is empty.
+
+diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c
+index f6d064d..e101537 100644
+--- a/inet/getnetgrent_r.c
++++ b/inet/getnetgrent_r.c
+@@ -297,7 +297,10 @@ __internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
+     {
+       status = DL_CALL_FCT (*fct, (datap, buffer, buflen, &errno));
+-      if (status == NSS_STATUS_RETURN)
++      if (status == NSS_STATUS_RETURN
++        /* The service returned a NOTFOUND, but there are more groups that we
++           need to resolve before we give up.  */
++        || (status == NSS_STATUS_NOTFOUND && datap->needed_groups != NULL))
+       {
+         /* This was the last one for this group.  Look at next group
+            if available.  */
+commit 984c0ea97f649c869130a1ff099098e2b6f70aad
+Author: Tim Lammens <tim.lammens@gmail.com>
+Date:   Thu Sep 11 10:35:54 2014 +0530
+
+    Fix memory leak in libio/wfileops.c do_ftell_wide [BZ #17370]
+
+diff --git a/libio/wfileops.c b/libio/wfileops.c
+index f123add..ebc06e8 100644
+--- a/libio/wfileops.c
++++ b/libio/wfileops.c
+@@ -711,6 +711,7 @@ do_ftell_wide (_IO_FILE *fp)
+               return WEOF;
+             offset += outstop - out;
++            free (out);
+           }
+         /* We don't trust _IO_read_end to represent the current file offset
+commit 52ffbdf25a1100986f4ae27bb0febbe5a722ab25
+Author: Florian Weimer <fweimer@redhat.com>
+Date:   Wed Sep 10 20:29:15 2014 +0200
+
+    malloc: additional unlink hardening for non-small bins [BZ #17344]
+    
+    Turn two asserts into a conditional call to malloc_printerr.  The
+    memory locations are accessed later anyway, so the performance
+    impact is minor.
+
+diff --git a/malloc/malloc.c b/malloc/malloc.c
+index 6ee3840..6cbe9f3 100644
+--- a/malloc/malloc.c
++++ b/malloc/malloc.c
+@@ -1418,8 +1418,10 @@ typedef struct malloc_chunk *mbinptr;
+         BK->fd = FD;                                                        \
+         if (!in_smallbin_range (P->size)                                    \
+             && __builtin_expect (P->fd_nextsize != NULL, 0)) {                      \
+-            assert (P->fd_nextsize->bk_nextsize == P);                              \
+-            assert (P->bk_nextsize->fd_nextsize == P);                              \
++          if (__builtin_expect (P->fd_nextsize->bk_nextsize != P, 0)        \
++              || __builtin_expect (P->bk_nextsize->fd_nextsize != P, 0))    \
++            malloc_printerr (check_action,                                  \
++                             "corrupted double-linked list (not small)", P);\
+             if (FD->fd_nextsize == NULL) {                                  \
+                 if (P->fd_nextsize == P)                                    \
+                   FD->fd_nextsize = FD->bk_nextsize = FD;                   \
+commit a7b872687073decdcc7effc2289877d69058aca9
+Author: Andreas Schwab <schwab@linux-m68k.org>
+Date:   Sat Sep 13 10:10:29 2014 +0200
+
+    Handle zero prefix length in getifaddrs (BZ #17371)
+
+diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
+index 2c04e17..a47b2ed 100644
+--- a/sysdeps/unix/sysv/linux/ifaddrs.c
++++ b/sysdeps/unix/sysv/linux/ifaddrs.c
+@@ -770,20 +770,17 @@ getifaddrs_internal (struct ifaddrs **ifap)
+                 if (cp != NULL)
+                   {
+-                    char c;
+                     unsigned int preflen;
+-                    if ((max_prefixlen > 0) &&
+-                        (ifam->ifa_prefixlen > max_prefixlen))
++                    if (ifam->ifa_prefixlen > max_prefixlen)
+                       preflen = max_prefixlen;
+                     else
+                       preflen = ifam->ifa_prefixlen;
+-                    for (i = 0; i < ((preflen - 1) / 8); i++)
++                    for (i = 0; i < preflen / 8; i++)
+                       *cp++ = 0xff;
+-                    c = 0xff;
+-                    c <<= ((128 - preflen) % 8);
+-                    *cp = c;
++                    if (preflen % 8)
++                      *cp = 0xff << (8 - preflen % 8);
+                   }
+               }
+           }
+commit 545583d664b64ff234b99aca0d85e99c8a55808f
+Author: Siddhesh Poyarekar <siddhesh@redhat.com>
+Date:   Tue Sep 16 14:20:45 2014 +0530
+
+    Fix memory leak in error path of do_ftell_wide (BZ #17370)
+
+diff --git a/libio/wfileops.c b/libio/wfileops.c
+index ebc06e8..c5ec5f7 100644
+--- a/libio/wfileops.c
++++ b/libio/wfileops.c
+@@ -708,7 +708,10 @@ do_ftell_wide (_IO_FILE *fp)
+                sequences must be complete since they are accepted as
+                wchar_t; if not, then that is an error.  */
+             if (__glibc_unlikely (status != __codecvt_ok))
+-              return WEOF;
++              {
++                free (out);
++                return WEOF;
++              }
+             offset += outstop - out;
+             free (out);
index 6a0a1075d96a4875fa8c2864c583cf456a7894bd..4cde171d67a0968ce548ca5fa7001d39e48650d3 100644 (file)
@@ -8,7 +8,7 @@
 # - math/{test-fenv,test-tgmath,test-float,test-ifloat}, debug/backtrace-tst(SEGV)  fail on alpha
 #
 # Conditional build:
-# min_kernel   (default is 2.6.16)
+# min_kernel   (default is 2.6.32)
 %bcond_without memusage        # don't build memusage utility
 %bcond_without selinux         # without SELinux support (in nscd)
 %bcond_with    tests           # perform "make test"
@@ -35,7 +35,7 @@ Summary(tr.UTF-8):    GNU libc
 Summary(uk.UTF-8):     GNU libc версії
 Name:          glibc
 Version:       %{core_version}
-Release:       1
+Release:       2
 Epoch:         6
 License:       LGPL v2.1+
 Group:         Libraries
@@ -51,6 +51,7 @@ Source6:      %{name}-localedb-gen
 Source7:       %{name}-LD-path.c
 Source8:       nscd.upstart
 Source9:       nscd.tmpfiles
+Patch0:                %{name}-git.patch
 # against GNU TP (libc domain)
 #Patch1:               %{name}-pl.po-update.patch
 Patch2:                %{name}-pld.patch
@@ -935,10 +936,12 @@ Narzędzie do profilowania zużycia pamięci.
 %prep
 %setup -q
 
-%if "%{min_kernel}" < "2.6.16"
-echo "Minimal supported kernel is 2.6.16" >&2
+%if "%{min_kernel}" < "2.6.32"
+echo "Minimal supported kernel is 2.6.32" >&2
 exit 1
 %endif
+
+%patch0 -p1
 %patch2 -p1
 %patch3 -p0
 %patch4 -p1
This page took 0.096349 seconds and 4 git commands to generate.