qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1492761 - /qpid/trunk/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp
Date Thu, 13 Jun 2013 16:59:42 GMT
Author: gsim
Date: Thu Jun 13 16:59:42 2013
New Revision: 1492761

URL: http://svn.apache.org/r1492761
Log:
QPID-4921: check pointer before using it

Modified:
    qpid/trunk/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp?rev=1492761&r1=1492760&r2=1492761&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/posix/SystemInfo.cpp Thu Jun 13 16:59:42 2013
@@ -111,7 +111,7 @@ namespace {
         for (::ifaddrs* info = interfaceInfo; info != 0; info = info->ifa_next) {
 
             // Only use IPv4/IPv6 interfaces
-            if (!isInetOrInet6(info->ifa_addr)) continue;
+            if (!info->ifa_addr || !isInetOrInet6(info->ifa_addr)) continue;
 
             int rc=::getnameinfo(info->ifa_addr, sa_len(info->ifa_addr),
                                  name, sizeof(name), 0, 0,



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message