You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "connorsimms (via GitHub)" <gi...@apache.org> on 2026/07/12 00:15:00 UTC

[PR] GH-50308: [C++][IPC] Add input size validation to SparseCSFIndex::Make [arrow]

connorsimms opened a new pull request, #50480:
URL: https://github.com/apache/arrow/pull/50480

   Resolves #50308
   
   ### Rationale for this change
   `SparseCSFIndex::Make` currently lacks validation for input vector sizes. This can lead to out-of-bounds memory access when provided with inconsistent input lengths. This PR adds the necessary checks to ensure that input is valid before object construction.
   
   ### What changes are included in this PR?
   - Input validation in `SparseCSFIndex::Make` to verify `axis_order` is nonzero and `indices_shapes`, `indptr_data`, `indices_data` have consistent dimensions.
   - A unit test to verify `Status::Invalid` is returned when inputs are mismatched.
   ### Are these changes tested?
   Yes, `cpp/src/arrow/sparse_tensor_test.cc` now contains `TEST(TestSparseCSFIndex, Make)`, which triggers the validation logic.
   ### Are there any user-facing changes?
   No.
   
   **This PR contains a "Critical Fix".**
   This fixes a bug that causes a segfault when invalid input parameters are passed to `SparseCSFIndex::Make`.
   
   **AI Usage:**
   AI was used to navigate the codebase and set up the build environment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50308: [C++][IPC] Add input size validation to SparseCSFIndex::Make [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #50480:
URL: https://github.com/apache/arrow/pull/50480#issuecomment-4949283099

   :warning: GitHub issue #50308 **has been automatically assigned in GitHub** to PR creator.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org