From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7D612139085 for ; Sun, 22 Jan 2017 21:09:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CCE2123407D; Sun, 22 Jan 2017 21:09:45 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9E49E23407D for ; Sun, 22 Jan 2017 21:09:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B32AF34167D for ; Sun, 22 Jan 2017 21:09:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5D6B62CCC for ; Sun, 22 Jan 2017 21:09:43 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1485119331.e06c613c8c92d16972f0861769ad2acbab33124e.robbat2@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/nfs-utils/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-fs/nfs-utils/files/nfs-utils-1.3.0-gcc-4.9.patch X-VCS-Directories: net-fs/nfs-utils/files/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: e06c613c8c92d16972f0861769ad2acbab33124e X-VCS-Branch: master Date: Sun, 22 Jan 2017 21:09:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8488be6f-bb79-44ef-a658-63d9774d6860 X-Archives-Hash: e406037f5ca9115aa03b212d29296c1c commit: e06c613c8c92d16972f0861769ad2acbab33124e Author: Michael Mair-Keimberger (asterix) gmail com> AuthorDate: Thu Jan 19 17:21:17 2017 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sun Jan 22 21:08:51 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e06c613c net-fs/nfs-utils: remove unsed patch (cherry picked from commit 5c5cbd85b48a42e262095ade628feb521ef6b0fa) Fixes: https://github.com/gentoo/gentoo/pull/3542 Signed-off-by: Robin H. Johnson gentoo.org> .../nfs-utils/files/nfs-utils-1.3.0-gcc-4.9.patch | 62 ---------------------- 1 file changed, 62 deletions(-) diff --git a/net-fs/nfs-utils/files/nfs-utils-1.3.0-gcc-4.9.patch b/net-fs/nfs-utils/files/nfs-utils-1.3.0-gcc-4.9.patch deleted file mode 100644 index e2d98b5..00000000 --- a/net-fs/nfs-utils/files/nfs-utils-1.3.0-gcc-4.9.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 25e83c2270b2d2966c992885faed0b79be09f474 Mon Sep 17 00:00:00 2001 -From: Jeff Layton -Date: Thu, 1 May 2014 11:15:16 -0400 -Subject: [PATCH [nfs-utils]] mountd: fix segfault in add_name with newer gcc - compilers - -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 a/support/export/client.c b/support/export/client.c -index dbf47b9..f85e11c 100644 ---- a/support/export/client.c -+++ b/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.0.0 -