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

rosserial_server: Fix access to uninitialized memory in handling service calls #626

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from

Conversation

peci1
Copy link

@peci1 peci1 commented Dec 8, 2023

When handling a service call, the C++ server doesn't check that the service is available, and it also doesn't check whether the service succeeded. If the service fails, the caller should assume it has not touched the reference to the response object. But the response object passed here is an uninitialized ShapeShifter. Therefore, without this fix, the uninitialized ShapeShifter is published as the service response, which is super bad!

There was an unclear note about .call() not returning anything on windows. On Windows? Since when do the rosserial servers run on windows? I hope this was some mistake and actually checking the return value of .call() will not break anything that should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant