Skip to content

fix(array): bounds check FixedSizeBinary.Value#923

Merged
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/fixed-size-binary-value-bounds
Jul 12, 2026
Merged

fix(array): bounds check FixedSizeBinary.Value#923
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/fixed-size-binary-value-bounds

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

FixedSizeBinary.Value applied the physical slice offset before validating the logical index. On sliced arrays, negative and one-past-the-end indexes could therefore expose adjacent values from the shared backing buffer.

This adds the standard array bounds check before applying the physical offset and covers valid, negative, and one-past-the-end access on a sliced three-element array.

Tests:

  • go test ./arrow/array -run 'TestFixedSizeBinary(ValueBounds|Slice|$)'
  • go test ./arrow/array

@fallintoplace fallintoplace requested a review from zeroshade as a code owner July 11, 2026 07:36

@zeroshade zeroshade left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — adds the missing logical bounds check before applying the physical offset in FixedSizeBinary.Value, matching Binary.Value/String.Value and fixing the sliced-array OOB read. CI green. Thanks @fallintoplace!

@zeroshade zeroshade merged commit 8da6175 into apache:main Jul 12, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants