summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-11-27 13:03:32 +0000
committerGordon Sim <gsim@apache.org>2008-11-27 13:03:32 +0000
commitb5c3849ea0c41eb3a1a0259390aa8797348f32e4 (patch)
tree55b918005440cfcf3befbb27358a5e3ab02a9f51 /cpp/src
parent6b67c025160e2363052820b9f686bbf386d9c96a (diff)
downloadqpid-python-b5c3849ea0c41eb3a1a0259390aa8797348f32e4.tar.gz
Further check in decode of policy.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@721174 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/broker/Queue.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp
index a78744598c..d664e6e141 100644
--- a/cpp/src/qpid/broker/Queue.cpp
+++ b/cpp/src/qpid/broker/Queue.cpp
@@ -760,7 +760,7 @@ Queue::shared_ptr Queue::decode(QueueRegistry& queues, Buffer& buffer)
std::pair<Queue::shared_ptr, bool> result = queues.declare(name, true);
buffer.get(result.first->settings);
result.first->configure(result.first->settings);
- if (result.first->policy.get()) {
+ if (result.first->policy.get() && buffer.available() >= result.first->policy->encodedSize()) {
buffer.get ( *(result.first->policy) );
}
return result.first;