Commits

Antoine Pitrou authored fd580db7573
ARROW-15360: [Python] Check slice bounds in Buffer.slice() Calling `Buffer.slice()` with invalid arguments could return a Buffer referencing out-of-bounds memory. With this change, an IndexError is raised instead. Note that `Buffer.__getitem__()` is unaffected, as it applies Python slice semantics: indices out of bounds are automatically clamped. Closes #12182 from pitrou/ARROW-15360-buffer-slice Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>