From d97f224e43da0c904211fb9351e0a1cf3b58635e Mon Sep 17 00:00:00 2001 From: Okan <61149510+okan-nako@users.noreply.github.com> Date: Wed, 27 May 2026 11:12:55 +0200 Subject: [PATCH] Update Timer_List_T.cpp Since increasing id_counter_ can lead to an overflow, we propose adding an overflow check. --- ACE/ace/Timer_List_T.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ACE/ace/Timer_List_T.cpp b/ACE/ace/Timer_List_T.cpp index 89a6387699549..bda2f7d63df22 100644 --- a/ACE/ace/Timer_List_T.cpp +++ b/ACE/ace/Timer_List_T.cpp @@ -210,8 +210,15 @@ ACE_Timer_List_T::schedule_i (const TYPE & if (n != 0) { - long id = this->id_counter_++; - + long id = this->id_counter_; + if (this->id_counter_ < LONG_MAX) + { + this->id_counter_++; + } + else + { + this->id_counter_ = 0; + } if (id != -1) { n->set (type, act, future_time, interval, 0, 0, id); this->schedule_i (n, future_time);