diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2003-03-20 22:02:55 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2003-03-20 22:02:55 +0000 |
commit | ac7817bf9e7bce89ec117343eaa8bbf8d3086f3c (patch) | |
tree | 9118acadf0bdd95e56a45b0665ba643a0c7acaaf | |
parent | 2d063afc6dca9dfece479f0d80ad99095a7ccd9c (diff) | |
download | ATCD-ac7817bf9e7bce89ec117343eaa8bbf8d3086f3c.tar.gz |
ChangeLogTag:Thu Mar 20 14:00:53 2003 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ace/Memory_Pool.cpp | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index bd9e063bab9..0c73c7dffc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Mar 20 14:00:53 2003 Ossama Othman <ossama@uci.edu> + + * ace/Memory_Pool.cpp (find_seg): + + Fixed overflow in pointer arithmetic on platforms where + sizeof(void*) is greater than sizeof(off_t). This also fixes a + "cast from pointer to integer of different size" warning. + Thu Mar 20 12:56:26 2003 Ossama Othman <ossama@uci.edu> * tests/Recursive_Condition_Bug_Test.cpp: diff --git a/ace/Memory_Pool.cpp b/ace/Memory_Pool.cpp index 89f95d0369b..e05e54cf19f 100644 --- a/ace/Memory_Pool.cpp +++ b/ace/Memory_Pool.cpp @@ -681,7 +681,7 @@ ACE_Shared_Memory_Pool::find_seg (const void* const searchPtr, // If segment 'counter' starts at a location greater than the // place we are searching for. We then decrement the offset to // the start of counter-1. (flabar@vais.net) - if ((offset + (off_t)(this->base_addr_) ) > (off_t)searchPtr) + if (((ptrdiff_t) offset + (ptrdiff_t) (this->base_addr_)) > (ptrdiff_t) searchPtr) { --counter; offset -= buf.shm_segsz; |