slyfox      14/05/16 22:22:32

  Added:                proftpd-1.3.5-netaddr-segv.patch
  Log:
  Version bump.
  
  (Portage version: 2.2.10_p15/cvs/Linux x86_64, signed Manifest commit with 
key 611FF3AA)

Revision  Changes    Path
1.1                  net-ftp/proftpd/files/proftpd-1.3.5-netaddr-segv.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/proftpd/files/proftpd-1.3.5-netaddr-segv.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/proftpd/files/proftpd-1.3.5-netaddr-segv.patch?rev=1.1&content-type=text/plain

Index: proftpd-1.3.5-netaddr-segv.patch
===================================================================
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




Reply via email to