From 6ad0f3986dba5485098edf34fcf5db5eab2b68a2 Mon Sep 17 00:00:00 2001 From: GoesM Date: Fri, 15 Mar 2024 00:27:41 +0800 Subject: [PATCH 1/2] replace throw-error with error-log to avoid UAF Signed-off-by: GoesM --- nav2_util/include/nav2_util/simple_action_server.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nav2_util/include/nav2_util/simple_action_server.hpp b/nav2_util/include/nav2_util/simple_action_server.hpp index eec9c2dd9f..0325dbcc3c 100644 --- a/nav2_util/include/nav2_util/simple_action_server.hpp +++ b/nav2_util/include/nav2_util/simple_action_server.hpp @@ -315,7 +315,7 @@ class SimpleActionServer if (steady_clock::now() - start_time >= server_timeout_) { terminate_all(); if (completion_callback_) {completion_callback_();} - throw std::runtime_error("Action callback is still running and missed deadline to stop"); + error_msg("Action callback is still running and missed deadline to stop") } } From 6a41d35a4e8131046fba0aa3f13cb980246e6d36 Mon Sep 17 00:00:00 2001 From: GoesM Date: Fri, 15 Mar 2024 01:02:15 +0800 Subject: [PATCH 2/2] fix typo Signed-off-by: GoesM --- nav2_util/include/nav2_util/simple_action_server.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nav2_util/include/nav2_util/simple_action_server.hpp b/nav2_util/include/nav2_util/simple_action_server.hpp index 0325dbcc3c..c8b1660840 100644 --- a/nav2_util/include/nav2_util/simple_action_server.hpp +++ b/nav2_util/include/nav2_util/simple_action_server.hpp @@ -315,7 +315,7 @@ class SimpleActionServer if (steady_clock::now() - start_time >= server_timeout_) { terminate_all(); if (completion_callback_) {completion_callback_();} - error_msg("Action callback is still running and missed deadline to stop") + error_msg("Action callback is still running and missed deadline to stop"); } }