summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-ftp/proftpd/files/proftpd-1.3.5-netaddr-segv.patch')
-rw-r--r--net-ftp/proftpd/files/proftpd-1.3.5-netaddr-segv.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/net-ftp/proftpd/files/proftpd-1.3.5-netaddr-segv.patch b/net-ftp/proftpd/files/proftpd-1.3.5-netaddr-segv.patch
new file mode 100644
index 000000000000..3efd6c0681fb
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.5-netaddr-segv.patch
@@ -0,0 +1,21 @@
+Skip addressless interfaces.
+
+Caught by api-tests as:
+> 99%: Checks: 197, Failures: 0, Errors: 1
+> api/netaddr.c:146:E:base:netaddr_get_addr2_test:0: (after this point) Received signal 11 (Segmentation fault)
+diff --git a/src/netaddr.c b/src/netaddr.c
+index 2657ca7..0029c7e 100644
+--- a/src/netaddr.c
++++ b/src/netaddr.c
+@@ -761,7 +761,10 @@ static pr_netaddr_t *get_addr_by_device(pool *p, const char *name,
+ int found_device = FALSE;
+
+ for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
+-
++ if (ifa->ifa_addr == NULL) {
++ /* returns NULL for uninitialized 'tun0' for example. */
++ continue;
++ }
+ /* We're only looking for addresses, not stats. */
+ if (ifa->ifa_addr->sa_family != AF_INET
+ #ifdef PR_USE_IPV6