]> git.pld-linux.org Git - packages/glibc.git/commitdiff
- rel 16; fix gcc 8 build auto/th/glibc-2.27-16
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 30 Jul 2018 19:49:21 +0000 (21:49 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 30 Jul 2018 19:49:21 +0000 (21:49 +0200)
glibc-nis-build.patch [new file with mode: 0644]
glibc.spec

diff --git a/glibc-nis-build.patch b/glibc-nis-build.patch
new file mode 100644 (file)
index 0000000..47bc6d3
--- /dev/null
@@ -0,0 +1,61 @@
+commit 780684eb04298977bc411ebca1eadeeba4877833
+Author: Maciej W. Rozycki <macro@mips.com>
+Date:   Wed Jun 27 21:12:16 2018 +0100
+
+    nisplus: Correct pwent parsing issue and resulting build error [BZ #23266]
+    
+    Copy and null-terminate NIS+ password file UID and GID entries whose
+    length is non-zero and are not terminated, in addition to empty ones,
+    fixing a bug and a compilation issue causing an error with GCC 8:
+    
+    nss_nisplus/nisplus-parser.c: In function '_nss_nisplus_parse_pwent':
+    nss_nisplus/nisplus-parser.c:90:7: error: 'strncpy' destination unchanged after copying no bytes [-Werror=stringop-truncation]
+           strncpy (first_unused, numstr, len);
+           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    nss_nisplus/nisplus-parser.c:106:7: error: 'strncpy' destination unchanged after copying no bytes [-Werror=stringop-truncation]
+           strncpy (first_unused, numstr, len);
+           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    
+    introduced with commit ac05397075f6:
+    
+    commit ac05397075f621cfdbe1db527c96167a58b6d18e
+    Author: Ulrich Drepper <drepper@redhat.com>
+    Date:   Sun Apr 30 07:01:26 2006 +0000
+    
+            * nis/nss_nisplus/nisplus-parser.c: Minor optimizations and
+            cleanups.  Avoid copying data if it can be used in the old place.
+    
+    (no mailing list reference available).  Obviously regardless of the
+    recently added compiler diagnostics causing a build error this code has
+    been long non-functional, so I guess NIS+ servers have been supplying
+    strings that are non-empty and have already been null-terminated.
+    Which in turn made it unnecessary to make a null-terminated copy,
+    masking this bug.
+    
+            [BZ #23266]
+            * nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_pwent):
+            Copy and null-terminate entries that are not terminated, in
+            addition to empty ones.
+
+diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c
+index 8dc021e73d..d2b06334c2 100644
+--- a/nis/nss_nisplus/nisplus-parser.c
++++ b/nis/nss_nisplus/nisplus-parser.c
+@@ -82,7 +82,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
+   char *numstr = NISOBJVAL (2, obj);
+   len = NISOBJLEN (2, obj);
+-  if (len == 0 && numstr[len - 1] != '\0')
++  if (len == 0 || numstr[len - 1] != '\0')
+     {
+       if (len >= room_left)
+       goto no_more_room;
+@@ -98,7 +98,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
+   numstr = NISOBJVAL (3, obj);
+   len = NISOBJLEN (3, obj);
+-  if (len == 0 && numstr[len - 1] != '\0')
++  if (len == 0 || numstr[len - 1] != '\0')
+     {
+       if (len >= room_left)
+       goto no_more_room;
index 09c5d6adf0a219103a4badf0b37d71823f93cefd..078c90a6e5dc040a39b53e0842c6ae963caabd78 100644 (file)
@@ -41,7 +41,7 @@ Summary(tr.UTF-8):    GNU libc
 Summary(uk.UTF-8):     GNU libc версії
 Name:          glibc
 Version:       %{core_version}
-Release:       15
+Release:       16
 Epoch:         6
 License:       LGPL v2.1+
 Group:         Libraries
@@ -72,6 +72,7 @@ Patch8:               %{name}-missing-nls.patch
 Patch9:                %{name}-nss_include_dirs.patch
 Patch10:       %{name}-info.patch
 Patch11:       %{name}-autoconf.patch
+Patch12:       glibc-nis-build.patch
 
 Patch14:       %{name}-sparc-errno_fix.patch
 Patch15:       %{name}-new-charsets.patch
@@ -965,6 +966,7 @@ exit 1
 
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 %patch14 -p0
 %patch15 -p1
This page took 0.446421 seconds and 4 git commands to generate.