diff options
author | Michael Mair-Keimberger (asterix) <m.mairkeimberger@gmail.com> | 2017-01-19 18:21:17 +0100 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2017-01-22 13:08:51 -0800 |
commit | e06c613c8c92d16972f0861769ad2acbab33124e (patch) | |
tree | 9afaec9ade35fa2b87142d848a66d599a7399ecd /net-fs/nfs-utils/files | |
parent | profiles: enable net-proxy/haproxy USE=device-atlas. (diff) | |
download | gentoo-e06c613c8c92d16972f0861769ad2acbab33124e.tar.gz gentoo-e06c613c8c92d16972f0861769ad2acbab33124e.tar.bz2 gentoo-e06c613c8c92d16972f0861769ad2acbab33124e.zip |
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 <robbat2@gentoo.org>
Diffstat (limited to 'net-fs/nfs-utils/files')
-rw-r--r-- | net-fs/nfs-utils/files/nfs-utils-1.3.0-gcc-4.9.patch | 62 |
1 files changed, 0 insertions, 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 e2d98b517e32..000000000000 --- 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 <jlayton@poochiereds.net> -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 <law@redhat.com> -Cc: Jakub Jelinek <jakub@redhat.com> -Signed-off-by: Jeff Layton <jlayton@poochiereds.net> -Signed-off-by: Steve Dickson <steved@redhat.com> ---- - 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 - |