You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2016/02/03 03:18:32 UTC
qpid-proton git commit: PROTON-1125: c++: Fix core dump on empty
address in link_options, discovered by coverity.
Repository: qpid-proton
Updated Branches:
refs/heads/aconway-proton-1125 [created] 35952a065
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/35952a06
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/35952a06
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/35952a06
Branch: refs/heads/aconway-proton-1125
Commit: 35952a065d9023e0327c2bb62ca37134f47a6626
Parents: 5917bf8
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Feb 2 21:17:34 2016 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Feb 2 21:17:34 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/35952a06/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: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org