Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix buffer over-reads in handle_tight #524

Merged
merged 1 commit into from
Aug 27, 2015

Conversation

DirectXMan12
Copy link
Member

For performance reasons, the handle_tight function skips the
use of the receive queue API and uses the raw receive queue directly.
Because of the way that typed array receive queue gets reused, this
introduced the potential for buffer over-reads.

To address this, a new function, rQwhole, was introduced.
rQwhole simply returns a new view into the receive queue that
starts at 0 and ends at the current recorded end of the queue.

handle_tight now makes use of this function.

Fixes #522

For performance reasons, the `handle_tight` function skips the
use of the receive queue API and uses the raw receive queue directly.
Because of the way that typed array receive queue gets reused, this
introduced the potential for buffer over-reads.

To address this, a new function, `rQwhole`, was introduced.
`rQwhole` simply returns a new view into the receive queue that
starts at 0 and ends at the current recorded end of the queue.

`handle_tight` now makes use of this function.

Fixes #522
@DirectXMan12
Copy link
Member Author

@kanaka @samhed any objections to this?

@kanaka
Copy link
Member

kanaka commented Aug 27, 2015

Looks fine to me although I'm seeing travis errors.

@DirectXMan12
Copy link
Member Author

That was just Travis having a moment, I think

DirectXMan12 added a commit that referenced this pull request Aug 27, 2015
Fix buffer over-reads in handle_tight
@DirectXMan12 DirectXMan12 merged commit 40b35fa into master Aug 27, 2015
@DirectXMan12 DirectXMan12 deleted the bug/tight-buffer-overread branch August 27, 2015 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants