Skip to content

Commit

Permalink
replace throw-error with error-log to avoid UAF mentioned in #4175 (#…
Browse files Browse the repository at this point in the history
…4180) (#4305)

* replace throw-error with error-log to avoid UAF



* fix typo



---------

Signed-off-by: GoesM <[email protected]>
Co-authored-by: GoesM <[email protected]>
  • Loading branch information
GoesM and GoesM authored May 7, 2024
1 parent 150dd6b commit 11075c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nav2_util/include/nav2_util/simple_action_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ class SimpleActionServer
info_msg("Waiting for async process to finish.");
if (steady_clock::now() - start_time >= server_timeout_) {
terminate_all();
completion_callback_();
throw std::runtime_error("Action callback is still running and missed deadline to stop");
if (completion_callback_) {completion_callback_();}
error_msg("Action callback is still running and missed deadline to stop");
}
}

Expand Down

0 comments on commit 11075c0

Please sign in to comment.