mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Correct an off-by-one in the boundary check. Otherwise, resource
allocations would fail if the desired allocation size was equal to the boundary.
This commit is contained in:
parent
93001c7214
commit
72aeb19aba
1 changed files with 1 additions and 1 deletions
|
|
@ -229,7 +229,7 @@ rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end,
|
|||
*/
|
||||
do {
|
||||
rstart = (rstart + amask) & ~amask;
|
||||
if (((rstart ^ (rstart + count)) & bmask) != 0)
|
||||
if (((rstart ^ (rstart + count - 1)) & bmask) != 0)
|
||||
rstart += bound - (rstart & ~bmask);
|
||||
} while ((rstart & amask) != 0 && rstart < end &&
|
||||
rstart < s->r_end);
|
||||
|
|
|
|||
Loading…
Reference in a new issue