Skip to content

Commit

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

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



* fix typo



---------

Signed-off-by: GoesM <GoesM@buaa.edu.cn>
Co-authored-by: GoesM <GoesM@buaa.edu.cn>
  • Loading branch information
2 people authored and RBT22 committed Sep 26, 2024
1 parent 24c2381 commit 8012d95
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 8012d95

Please sign in to comment.