diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-31 14:47:58 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-31 14:47:58 +0000 |
commit | 620c19b5042ae52a6de70b1c94943ddbc5aa8683 (patch) | |
tree | a8048dd0368eaef87974964608d6efa2b29b3a30 /ace/Timer_Heap_T.cpp | |
parent | 90c73fa1bca0b46cfd152767f76029b37c8accba (diff) | |
download | ATCD-620c19b5042ae52a6de70b1c94943ddbc5aa8683.tar.gz |
changed cancel(id) to check the timer id to make sure it is in range
Diffstat (limited to 'ace/Timer_Heap_T.cpp')
-rw-r--r-- | ace/Timer_Heap_T.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ace/Timer_Heap_T.cpp b/ace/Timer_Heap_T.cpp index ff1441c6d58..90aa0b803a5 100644 --- a/ace/Timer_Heap_T.cpp +++ b/ace/Timer_Heap_T.cpp @@ -555,6 +555,10 @@ ACE_Timer_Heap_T<TYPE, FUNCTOR, LOCK>::cancel (long timer_id, // Locate the ACE_Timer_Node that corresponds to the timer_id. + // Check to see if the timer_id is out of range + if (timer_id < 0 || (size_t)timer_id > this->max_size_) + return 0; + long timer_node_slot = this->timer_ids_[timer_id]; if (timer_id != this->heap_[timer_node_slot]->get_timer_id ()) |