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
This commit is contained in:
parent
8a85be4636
commit
07865c4022
@ -255,7 +255,7 @@ public:
|
|||||||
bool ContainsAddress(addr_t address) const
|
bool ContainsAddress(addr_t address) const
|
||||||
{
|
{
|
||||||
return address >= (addr_t)fInfo.text
|
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
|
int32 FindSymbol(addr_t address) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user