From 5c5c256d50e41e2cee349c38ad4935fdffcb7933 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 7 Oct 2014 13:54:56 +0200 Subject: [PATCH] nfs-utils: update to 1.3.1. --- ...ult-in-add_name-with-newer-gcc-compi.patch | 63 ------------------- srcpkgs/nfs-utils/template | 6 +- 2 files changed, 3 insertions(+), 66 deletions(-) delete mode 100644 srcpkgs/nfs-utils/patches/22-mountd-fix-segfault-in-add_name-with-newer-gcc-compi.patch diff --git a/srcpkgs/nfs-utils/patches/22-mountd-fix-segfault-in-add_name-with-newer-gcc-compi.patch b/srcpkgs/nfs-utils/patches/22-mountd-fix-segfault-in-add_name-with-newer-gcc-compi.patch deleted file mode 100644 index c835404228..0000000000 --- a/srcpkgs/nfs-utils/patches/22-mountd-fix-segfault-in-add_name-with-newer-gcc-compi.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 8b03fdbfb0dd8e0147aa61ff30b8311235caf5f3 Mon Sep 17 00:00:00 2001 -From: Jeff Layton -Date: Thu, 1 May 2014 11:15:16 -0400 -Subject: [PATCH] mountd: fix segfault in add_name with newer gcc compilers -Bug-Debian: http://bugs.debian.org/757835 -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+bug/1355829 - -I hit a segfault in add_name with a mountd built with gcc-4.9.0. Some -NULL pointer checks got reordered such that a pointer was dereferenced -before checking to see whether it was NULL. The problem was due to -nfs-utils relying on undefined behavior, which tricked gcc into assuming -that the pointer would never be NULL. - -At first I assumed that this was a compiler bug, but Jakub Jelinek and -Jeff Law pointed out: - -"If old is NULL, then: - - strncpy(new, old, cp-old); - -is undefined behavior (even when cp == old == NULL in that case), -therefore gcc assumes that old is never NULL, as otherwise it would be -invalid. - -Just guard - strncpy(new, old, cp-old); - new[cp-old] = 0; -with if (old) { ... }." - -This patch does that. If old is NULL though, then we still need to -ensure that new is NULL terminated, lest the subsequent strcats walk off -the end of it. - -Cc: Jeff Law -Cc: Jakub Jelinek -Signed-off-by: Jeff Layton -Signed-off-by: Steve Dickson ---- - support/export/client.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git support/export/client.c support/export/client.c -index ba2db8f..e749cac 100644 ---- support/export/client.c -+++ support/export/client.c -@@ -482,8 +482,12 @@ add_name(char *old, const char *add) - else - cp = cp + strlen(cp); - } -- strncpy(new, old, cp-old); -- new[cp-old] = 0; -+ if (old) { -+ strncpy(new, old, cp-old); -+ new[cp-old] = 0; -+ } else { -+ new[0] = 0; -+ } - if (cp != old && !*cp) - strcat(new, ","); - strcat(new, add); --- -2.1.0.rc1 - diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template index f2aadbe6bf..74e048fcdc 100644 --- a/srcpkgs/nfs-utils/template +++ b/srcpkgs/nfs-utils/template @@ -1,13 +1,13 @@ # Template file for 'nfs-utils' pkgname=nfs-utils -version=1.3.0 -revision=2 +version=1.3.1 +revision=1 short_desc="Network File System client utilities" maintainer="Juan RP " license="GPL-2" homepage="http://nfs.sourceforge.net" distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz" -checksum=ab8384d0e487ed6a18c5380d5df28015f7dd98680bf08f3247c97d9f7d99e56f +checksum=ff79d70b7b58b2c8f9b798c58721127e82bb96022adc04a5c4cb251630e696b8 hostmakedepends="pkg-config" makedepends="libblkid-devel libmount-devel libtirpc-devel