From 07865c4022f9f0a868382f59e885901f7ef6b6af Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 24 Sep 2008 14:47:05 +0000 Subject: [PATCH] Fixed check whether an address is contained in an image. Address + size does overflow when the image ends at the end of the address space (like the commpage). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27723 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/debug/profile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/debug/profile.cpp b/src/bin/debug/profile.cpp index bf35a83997..6666220226 100644 --- a/src/bin/debug/profile.cpp +++ b/src/bin/debug/profile.cpp @@ -255,7 +255,7 @@ public: bool ContainsAddress(addr_t address) const { return address >= (addr_t)fInfo.text - && address < (addr_t)fInfo.data + fInfo.data_size; + && address <= (addr_t)fInfo.data + fInfo.data_size - 1; } int32 FindSymbol(addr_t address) const