diff options
| author | Alan Conway <aconway@apache.org> | 2011-02-02 22:15:01 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2011-02-02 22:15:01 +0000 |
| commit | 737923f33db27dc5685d25e31bff38c4f20b2781 (patch) | |
| tree | 91a42dcbaed00964ab69b47bf89dba430b8c4ab8 /qpid/cpp/src | |
| parent | 6d38b63b7d48cb83ec2f43999d3a2324a0f2cfbf (diff) | |
| download | qpid-python-737923f33db27dc5685d25e31bff38c4f20b2781.tar.gz | |
QPID-3033 Bug 674183 - Segmentation fault while processing session.attach
If a faulty client sent invalid frames to a connection that was not
yet in the open state, the broker would core dump.
The fix is to close the connection with a 'framing-error' in this case.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1066661 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/Connection.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/Connection.cpp b/qpid/cpp/src/qpid/broker/Connection.cpp index 82761ac7e4..460799280e 100644 --- a/qpid/cpp/src/qpid/broker/Connection.cpp +++ b/qpid/cpp/src/qpid/broker/Connection.cpp @@ -160,7 +160,10 @@ void Connection::received(framing::AMQFrame& frame) { if (frame.getChannel() == 0 && frame.getMethod()) { adapter.handle(frame); } else { - getChannel(frame.getChannel()).in(frame); + if (adapter.isOpen()) + getChannel(frame.getChannel()).in(frame); + else + close(connection::CLOSE_CODE_FRAMING_ERROR, "Connection not yet open, invalid frame received."); } if (isLink) //i.e. we are acting as the client to another broker |
