mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
base: fix _sum_in_range in avl structure
Handles corner case when addr + size becomes exactly 0. Before the commit the function returned that sum is not part of the range, which is wrong. Issue #3111
This commit is contained in:
parent
812149ed29
commit
d1f37e66eb
@ -48,7 +48,7 @@ class Genode::Allocator_avl_base : public Range_allocator
|
||||
private:
|
||||
|
||||
static bool _sum_in_range(addr_t addr, addr_t offset) {
|
||||
return (~0UL - addr > offset); }
|
||||
return (addr + offset - 1) >= addr; }
|
||||
|
||||
/*
|
||||
* Noncopyable
|
||||
|
Loading…
Reference in New Issue
Block a user