This repository was archived by the owner on May 31, 2025. It is now read-only.
Avoids buffer overflow in xmlrpcpp if fd > 1024#1113
Closed
kmactavish wants to merge 1 commit intoros:lunar-develfrom
Closed
Avoids buffer overflow in xmlrpcpp if fd > 1024#1113kmactavish wants to merge 1 commit intoros:lunar-develfrom
kmactavish wants to merge 1 commit intoros:lunar-develfrom
Conversation
Contributor
Author
|
The build of 582984f failed due to a test added by #1014. Even with this entire change commented out. |
This was referenced Jul 28, 2017
Merged
Closed
A temporary fix to avoid buffer overflow in XmlRpcDispatch, since select() only works for file descriptors < FD_SETSIZE (1024). The real solution is to switch to poll as in ros#833, but since that PR was reverted, this avoids catastrophic failure. It throws instead of being silent, since (a) this behaviour is no less intrusive than a buffer overflow, and (b) returning an error was handled silently, and just looked like ros comm not being connected.
d44d9bd to
9cad0e5
Compare
Contributor
Author
|
This was superseded by #1133 . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A temporary fix to avoid buffer overflow in XmlRpcDispatch, since select() only works for file descriptors <
FD_SETSIZE(1024). Iffd >= FD_SETSIZE, there is buffer overflow, memory corruption, and all-round undefined behaviour. The real solution is to switch to poll as in #833, but since that PR was reverted in #981, this avoids catastrophic failure until that can be worked out.It throws an exception since: