[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:
Peter Zhu 2024-12-06 15:08:24 -05:00
parent 8010d79bb4
commit 7341a4fc07
Notes: git 2024-12-09 16:52:20 +00:00

View File

@ -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