diff options
-rw-r--r-- | src/lib/utils/locking_allocator/locking_allocator.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/lib/utils/locking_allocator/locking_allocator.cpp b/src/lib/utils/locking_allocator/locking_allocator.cpp index bdd675af1..880f3add8 100644 --- a/src/lib/utils/locking_allocator/locking_allocator.cpp +++ b/src/lib/utils/locking_allocator/locking_allocator.cpp @@ -22,14 +22,7 @@ bool ptr_in_pool(const void* pool_ptr, size_t poolsize, { const uintptr_t pool = reinterpret_cast<uintptr_t>(pool_ptr); const uintptr_t buf = reinterpret_cast<uintptr_t>(buf_ptr); - - if(buf < pool || buf >= pool + poolsize) - return false; - - BOTAN_ASSERT(buf + bufsize <= pool + poolsize, - "Pointer does not partially overlap pool"); - - return true; + return (buf >= pool) && (buf + bufsize <= pool + poolsize); } size_t padding_for_alignment(size_t offset, size_t desired_alignment) |