You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2014/08/20 22:30:18 UTC

[1/2] git commit: https://issues.apache.org/jira/browse/AMQCPP-550

Repository: activemq-cpp
Updated Branches:
  refs/heads/3.8.x 08baa709a -> ac836a5bc
  refs/heads/trunk b8a98a3c0 -> a965f2b83


https://issues.apache.org/jira/browse/AMQCPP-550

Fix for potential NPE

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

Branch: refs/heads/trunk
Commit: a965f2b838a458a1e69fd80fac58bc14571af018
Parents: b8a98a3
Author: Timothy Bish <ta...@gmail.com>
Authored: Wed Aug 20 16:16:14 2014 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Wed Aug 20 16:16:14 2014 -0400

----------------------------------------------------------------------
 activemq-cpp/src/main/decaf/net/InetAddress.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/a965f2b8/activemq-cpp/src/main/decaf/net/InetAddress.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/decaf/net/InetAddress.cpp b/activemq-cpp/src/main/decaf/net/InetAddress.cpp
index 53576fb..9dff3d6 100644
--- a/activemq-cpp/src/main/decaf/net/InetAddress.cpp
+++ b/activemq-cpp/src/main/decaf/net/InetAddress.cpp
@@ -167,7 +167,7 @@ InetAddress InetAddress::getLocalHost() {
         apr_sockaddr_t* address = NULL;
         result = apr_sockaddr_info_get(&address, hostname, APR_UNSPEC, 0, APR_IPV4_ADDR_OK, pool.getAprPool());
 
-        if (result != APR_SUCCESS) {
+        if (result != APR_SUCCESS || address == NULL) {
             throw UnknownHostException(__FILE__, __LINE__, "Could not resolve the IP Address of this host.");
         }
 


[2/2] git commit: https://issues.apache.org/jira/browse/AMQCPP-550

Posted by ta...@apache.org.
https://issues.apache.org/jira/browse/AMQCPP-550

Fix for potential NPE


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

Branch: refs/heads/3.8.x
Commit: ac836a5bc082c6dcb95acd3ac013cb564ca22d57
Parents: 08baa70
Author: Timothy Bish <ta...@gmail.com>
Authored: Wed Aug 20 16:16:14 2014 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Wed Aug 20 16:25:05 2014 -0400

----------------------------------------------------------------------
 activemq-cpp/src/main/decaf/net/InetAddress.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/ac836a5b/activemq-cpp/src/main/decaf/net/InetAddress.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/decaf/net/InetAddress.cpp b/activemq-cpp/src/main/decaf/net/InetAddress.cpp
index 53576fb..9dff3d6 100644
--- a/activemq-cpp/src/main/decaf/net/InetAddress.cpp
+++ b/activemq-cpp/src/main/decaf/net/InetAddress.cpp
@@ -167,7 +167,7 @@ InetAddress InetAddress::getLocalHost() {
         apr_sockaddr_t* address = NULL;
         result = apr_sockaddr_info_get(&address, hostname, APR_UNSPEC, 0, APR_IPV4_ADDR_OK, pool.getAprPool());
 
-        if (result != APR_SUCCESS) {
+        if (result != APR_SUCCESS || address == NULL) {
             throw UnknownHostException(__FILE__, __LINE__, "Could not resolve the IP Address of this host.");
         }