summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-03-03 17:06:05 +0000
committerGordon Sim <gsim@apache.org>2010-03-03 17:06:05 +0000
commitb61bc77ec5a871cf5319ac770a78466d51334f20 (patch)
tree064121a35bb612f13de30ef075d22f1a221c3f37 /cpp/src
parent8d6bc01b5c2232b3d06ed45e051f0c066cd6ec71 (diff)
downloadqpid-python-b61bc77ec5a871cf5319ac770a78466d51334f20.tar.gz
QPID-2426: Check for empty name in address when resolving
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@918573 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/client/amqp0_10/AddressResolution.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp b/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
index f1b487c255..f81086db99 100644
--- a/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
+++ b/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
@@ -277,6 +277,9 @@ bool AddressResolution::is_reliable(const Address& address)
std::string checkAddressType(qpid::client::Session session, const Address& address)
{
+ if (address.getName().empty()) {
+ throw InvalidAddress("Name cannot be null");
+ }
std::string type = address.getType();
if (type.empty()) {
ExchangeBoundResult result = session.exchangeBound(arg::exchange=address.getName(), arg::queue=address.getName());