Skip to content

Reject oversized binary view values - #947

Merged
paleolimbot merged 1 commit into
apache:mainfrom
efegokdemir:codex/938-binary-view-length
Sep 29, 2026
Merged

paleolimbot merged 1 commit into
apache:mainfrom
efegokdemir:codex/938-binary-view-length

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

Summary

  • Reject binary and string view values larger than INT32_MAX before narrowing the length into the Arrow binary-view representation.
  • Add a regression test covering the overflow path without allocating a multi-gigabyte buffer.

Fixes #938

Testing

  • cmake -S . -B /tmp/arrow-nanoarrow-build-938 -DNANOARROW_BUILD_TESTS=ON — passed.
  • cmake --build /tmp/arrow-nanoarrow-build-938 --parallel 2 — passed.
  • ctest --test-dir /tmp/arrow-nanoarrow-build-938 --output-on-failure — passed (287/287; 3 thread-safety tests skipped by project configuration).
  • git diff --check — passed.

AI assistance was used during implementation; the submitted changes were reviewed and validated against the issue and the project test suite.

Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.19%. Comparing base (ec8a58c) to head (05da3f7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #947   +/-   ##
=======================================
  Coverage   78.19%   78.19%           
=======================================
  Files         106      106           
  Lines       16843    16845    +2     
  Branches     1985     1986    +1     
=======================================
+ Hits        13170    13172    +2     
  Misses       2439     2439           
  Partials     1234     1234           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Thank you!

@paleolimbot
paleolimbot merged commit ecba475 into apache:main Sep 29, 2026
43 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.

ArrowArrayAppendBytes has a narrowing cast when appending views with >INT32_MAX bytes

3 participants