From 4cf44d3621487415d5c2ccc5628c5e0c99119410 Mon Sep 17 00:00:00 2001
From: KWSys Robot <kwrobot@kitware.com>
Date: Thu, 8 Nov 2012 08:40:56 -0500
Subject: [PATCH] KWSys 2012-11-08 (3b17de34)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 3b17de34 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' df32fa6f..3b17de34
Brad King (1):
      3b17de34 SystemInformation: Do not dereference NULL ifa_addr

Change-Id: I2aecf9978d1f66ed021f47620d176a3837bc2ea3
---
 SystemInformation.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index 6b63b94695..6d990a99da 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -1323,7 +1323,7 @@ int SystemInformationImplementation::GetFullyQualifiedDomainName(
 
   for (ifa=ifas; ifa!=NULL; ifa=ifa->ifa_next)
     {
-    int fam=ifa->ifa_addr->sa_family;
+    int fam = ifa->ifa_addr? ifa->ifa_addr->sa_family : -1;
     if ((fam==AF_INET) || (fam==AF_INET6))
       {
       char host[NI_MAXHOST]={'\0'};
-- 
GitLab