[Bug #20933] Fix IO::Buffer overlap calculation
The allocated buffers may be consecutive memory addresses. This will mean that `b->base == a->base + a->size` even though `a` and `b` are separate buffers.
This commit is contained in:
parent
8010d79bb4
commit
7341a4fc07
Notes:
git
2024-12-09 16:52:20 +00:00
@ -3395,7 +3395,7 @@ io_buffer_overlaps(const struct rb_io_buffer *a, const struct rb_io_buffer *b)
|
||||
return io_buffer_overlaps(b, a);
|
||||
}
|
||||
|
||||
return (b->base >= a->base) && (b->base <= (void*)((unsigned char *)a->base + a->size));
|
||||
return (b->base >= a->base) && (b->base < (void*)((unsigned char *)a->base + a->size));
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
Loading…
x
Reference in New Issue
Block a user