aboutsummaryrefslogtreecommitdiffstats
path: root/main/nfs-utils/0010-exportfs-fix-test-of-NULL-pointer-in-host_pton.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-08-06 09:52:50 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-08-06 09:54:46 +0300
commit87c34001006b65b2be65cb87168b498c915390e1 (patch)
treebba7637346cb2a8a230234fc1c04b481f88e372a /main/nfs-utils/0010-exportfs-fix-test-of-NULL-pointer-in-host_pton.patch
parent910ce2ae3ff7e550d4f532c7d74d3e96526bc368 (diff)
downloadaports-87c34001006b65b2be65cb87168b498c915390e1.tar.bz2
aports-87c34001006b65b2be65cb87168b498c915390e1.tar.xz
main/nfs-utils: upgrade to 1.3.1-rc3 and refresh musl patches
use patch series sent to linux-nfs mailing list, and add one more patch to address accessing /proc/net/rpc.
Diffstat (limited to 'main/nfs-utils/0010-exportfs-fix-test-of-NULL-pointer-in-host_pton.patch')
-rw-r--r--main/nfs-utils/0010-exportfs-fix-test-of-NULL-pointer-in-host_pton.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/main/nfs-utils/0010-exportfs-fix-test-of-NULL-pointer-in-host_pton.patch b/main/nfs-utils/0010-exportfs-fix-test-of-NULL-pointer-in-host_pton.patch
new file mode 100644
index 0000000000..00ec08c787
--- /dev/null
+++ b/main/nfs-utils/0010-exportfs-fix-test-of-NULL-pointer-in-host_pton.patch
@@ -0,0 +1,49 @@
+From 7fc596097b2a0545a8a21e90ecdabdc34073ab49 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 2 Jun 2014 14:20:59 +0200
+Subject: [PATCH] exportfs: fix test of NULL pointer in host_pton()
+
+should fix https://bugzilla.redhat.com/show_bug.cgi?id=1083018
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ support/export/hostname.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/support/export/hostname.c b/support/export/hostname.c
+index ad595d1..d9153e1 100644
+--- a/support/export/hostname.c
++++ b/support/export/hostname.c
+@@ -115,6 +115,11 @@ host_pton(const char *paddr)
+ * have a real AF_INET presentation address, before invoking
+ * getaddrinfo(3) to generate the full addrinfo list.
+ */
++ if (paddr == NULL) {
++ xlog(D_GENERAL, "%s: passed a NULL presentation address",
++ __func__);
++ return NULL;
++ }
+ inet4 = 1;
+ if (inet_pton(AF_INET, paddr, &sin.sin_addr) == 0)
+ inet4 = 0;
+@@ -123,15 +128,12 @@ host_pton(const char *paddr)
+ switch (error) {
+ case 0:
+ if (!inet4 && ai->ai_addr->sa_family == AF_INET) {
++ xlog(D_GENERAL, "%s: failed to convert %s",
++ __func__, paddr);
+ freeaddrinfo(ai);
+ break;
+ }
+ return ai;
+- case EAI_NONAME:
+- if (paddr == NULL)
+- xlog(D_GENERAL, "%s: passed a NULL presentation address",
+- __func__);
+- break;
+ case EAI_SYSTEM:
+ xlog(D_GENERAL, "%s: failed to convert %s: (%d) %m",
+ __func__, paddr, errno);
+--
+2.0.4
+