diff options
| author | Gordon Sim <gsim@apache.org> | 2007-10-17 13:45:27 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-10-17 13:45:27 +0000 |
| commit | 69aabf18f7ce2377e411bddb8fb2297e2254b280 (patch) | |
| tree | 600fbde59d3c8116c7d8dff66511949fbe8f5a3a /cpp/src/qpid | |
| parent | 8d5defb2febf2988d77cc0b2ee8b7f137119eac1 (diff) | |
| download | qpid-python-69aabf18f7ce2377e411bddb8fb2297e2254b280.tar.gz | |
Fix to headers exchanges bind: need to check the match value is present before dereferencing
Added tests for this.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@585503 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/broker/HeadersExchange.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/HeadersExchange.cpp b/cpp/src/qpid/broker/HeadersExchange.cpp index 55cdb73ac1..215a002517 100644 --- a/cpp/src/qpid/broker/HeadersExchange.cpp +++ b/cpp/src/qpid/broker/HeadersExchange.cpp @@ -46,7 +46,7 @@ HeadersExchange::HeadersExchange(const std::string& _name, bool _durable, const bool HeadersExchange::bind(Queue::shared_ptr queue, const string& /*routingKey*/, const FieldTable* args){ RWlock::ScopedWlock locker(lock); FieldTable::ValuePtr what = args->get(x_match); - if (*what != all && *what != any) { + if (!what || (*what != all && *what != any)) { THROW_QPID_ERROR(PROTOCOL_ERROR, "Invalid x-match value binding to headers exchange."); } Binding binding(*args, queue); |
