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

[foxy backport] Guard against integer overflow in duration conversion (#1584) #1761

Merged
merged 2 commits into from
Sep 1, 2021

Conversation

jacobperron
Copy link
Member

Backport #1584 to Foxy.

Guard against overflow when converting from rclcpp::Duration to builtin_interfaces::msg::Duration,
which is a unsigned to signed conversion.

Use non-std int types for consistency

Handle large negative values

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron jacobperron self-assigned this Aug 31, 2021
@jacobperron jacobperron added this to Proposed in Foxy Patch Release 5 via automation Aug 31, 2021
@jacobperron jacobperron moved this from Proposed to Needs release in Foxy Patch Release 5 Aug 31, 2021
rclcpp::Duration::from_nanoseconds is not available in Foxy.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron
Copy link
Member Author

I had to update the test due to an API missing in Foxy (22a4c6d).

@jacobperron jacobperron merged commit c191956 into foxy Sep 1, 2021
@delete-merged-branch delete-merged-branch bot deleted the jacob/foxy_backport_1584 branch September 1, 2021 01:19
@jacobperron
Copy link
Member Author

jacobperron commented Sep 1, 2021

I meant to run CI before merging 🤦‍♂️

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

edit: warnings are unrelated

@jacobperron jacobperron moved this from Needs release to Released in Foxy Patch Release 5 Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants