Repository: qpid-proton
Updated Branches:
  refs/heads/0.12.x 7d3c01da2 -> 0096245da


PROTON-1125: c++: Fix core dump on empty address in link_options, discovered by 
coverity.


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

Branch: refs/heads/0.12.x
Commit: 0096245daff495a787ec7b03ad63989a54a65f0c
Parents: 7d3c01d
Author: Alan Conway <[email protected]>
Authored: Tue Feb 2 21:17:34 2016 -0500
Committer: Andrew Stitcher <[email protected]>
Committed: Tue Feb 2 22:30:14 2016 -0500

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/link_options.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0096245d/proton-c/bindings/cpp/src/link_options.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/link_options.cpp 
b/proton-c/bindings/cpp/src/link_options.cpp
index 7364c59..3fc694b 100644
--- a/proton-c/bindings/cpp/src/link_options.cpp
+++ b/proton-c/bindings/cpp/src/link_options.cpp
@@ -74,11 +74,10 @@ class link_options::impl {
         if (l.state() & endpoint::LOCAL_UNINIT) {
             bool sender = !l.receiver();
             if (local_address.set) {
-                const char *addr = local_address.value.empty() ? NULL : 
local_address.value.c_str();
                 if (sender)
-                    l.local_target().address(addr);
+                    l.local_target().address(local_address.value);
                 else
-                    l.local_source().address(addr);
+                    l.local_source().address(local_address.value);
             }
             if (delivery_mode.set) {
                 switch (delivery_mode.value) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to