rclcpp icon indicating copy to clipboard operation
rclcpp copied to clipboard

fix nullptr dereference in prune_requests_older_than

Open akela1101 opened this issue 4 years ago • 1 comments

Fixes #2007

akela1101 avatar Aug 30 '22 12:08 akela1101

(also, completely orthogonally, why is pruned_requests a pointer and not a reference? Maybe @ivanpauno can chime in since he added this API)

It's an optional output argument, so the vector isn't used if nullptr is provided. References cannot be nullptr, so they cannot be used in this case. For some reason I forgot the obvious if() in the original PR.

ivanpauno avatar Aug 30 '22 20:08 ivanpauno

@clalancette Sorry for waiting. I tried to add 2 tests, please check.

The way I tested them locally was:

colcon build --packages-select rclcpp
colcon test --packages-select rclcpp --ctest-args -R test_client
colcon test-result --verbose

akela1101 avatar Nov 23 '22 11:11 akela1101

1u

nice suggestion, fixed

akela1101 avatar Nov 23 '22 13:11 akela1101

CI:

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

fujitatomoya avatar Nov 30 '22 18:11 fujitatomoya

  • Windows Build Status

ivanpauno avatar Dec 01 '22 13:12 ivanpauno

Windows CI is not working yet...

@akela1101 can you address DCO failure?

fujitatomoya avatar Dec 01 '22 16:12 fujitatomoya

  • Windows Build Status

ivanpauno avatar Dec 06 '22 20:12 ivanpauno

@mergifyio backport humble

ivanpauno avatar Dec 13 '22 13:12 ivanpauno

backport humble

✅ Backports have been created

mergify[bot] avatar Dec 13 '22 13:12 mergify[bot]