GitHub user mtaylor reopened a pull request: https://github.com/apache/activemq-artemis/pull/583
ARTEMIS-570 Fix buffer size overflow ProtonHandler There is a race condition in the ProtonHandlerImpl.outputBuffer() method. The method checks to see how many bytes (n) are pending in the underlying ProtonJ buffer, then creates a Netty buffer of size n. It then writes the contents of the pending ProtonJ head. However, ProtonJ can still write to it's internal buffer, meaning that it's buffer.size > n causing an illegalArgumentException. This patch fixes it by only writing 'n' bytes to the Netty buffer. You can merge this pull request into a Git repository by running: $ git pull https://github.com/mtaylor/activemq-artemis Artemis-570 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-artemis/pull/583.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #583 ---- commit cc979b9de05588c58180d360cedecbdda208a9ea Author: Martyn Taylor <mtay...@redhat.com> Date: 2016-06-16T15:02:23Z ARTEMIS-570 Fix buffer size overflow ProtonHandler There is a race condition in the ProtonHandlerImpl.outputBuffer() method. The method checks to see how many bytes (n) are pending in the underlying ProtonJ buffer, then creates a Netty buffer of size n. It then writes the contents of the pending ProtonJ head. However, ProtonJ can still write to it's internal buffer, meaning that it's buffer.size > n causing an illegalArgumentException. This patch fixes it by only writing 'n' bytes to the Netty buffer. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---