Skip to content

Reject oversized binary view values - #947

Open
efegokdemir wants to merge 1 commit into
apache:mainfrom
efegokdemir:codex/938-binary-view-length
Open

efegokdemir wants to merge 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.

This branch has not been deployed

No deployments
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

2 participants