You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by pm...@apache.org on 2017/05/18 10:16:31 UTC

qpid-cpp git commit: QPID-7786: qpidd segfaults during startup when SSL certificate cant be read

Repository: qpid-cpp
Updated Branches:
  refs/heads/master f91a23c59 -> e7f533f0d


QPID-7786: qpidd segfaults during startup when SSL certificate cant be read

Check if currentAddrInfo != null before referencing it.

If it is null, whole attempt to listen on SSL port fails - expected outcome.

Signed-off-by: Pavel Moravec <pm...@redhat.com>


Project: http://git-wip-us.apache.org/repos/asf/qpid-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-cpp/commit/e7f533f0
Tree: http://git-wip-us.apache.org/repos/asf/qpid-cpp/tree/e7f533f0
Diff: http://git-wip-us.apache.org/repos/asf/qpid-cpp/diff/e7f533f0

Branch: refs/heads/master
Commit: e7f533f0df63510094cb220fa0894b6a4ddaac2a
Parents: f91a23c
Author: Pavel Moravec <pm...@redhat.com>
Authored: Thu May 18 12:13:21 2017 +0200
Committer: Pavel Moravec <pm...@redhat.com>
Committed: Thu May 18 12:13:21 2017 +0200

----------------------------------------------------------------------
 src/qpid/sys/posix/SocketAddress.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/e7f533f0/src/qpid/sys/posix/SocketAddress.cpp
----------------------------------------------------------------------
diff --git a/src/qpid/sys/posix/SocketAddress.cpp b/src/qpid/sys/posix/SocketAddress.cpp
index 263f1e8..20cce5e 100644
--- a/src/qpid/sys/posix/SocketAddress.cpp
+++ b/src/qpid/sys/posix/SocketAddress.cpp
@@ -322,7 +322,7 @@ void SocketAddress::firstAddress() const {
 }
 
 bool SocketAddress::nextAddress() const {
-    bool r = currentAddrInfo->ai_next != 0;
+    bool r = (currentAddrInfo) && (currentAddrInfo->ai_next != 0);
     if (r)
         currentAddrInfo = currentAddrInfo->ai_next;
     return r;


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