Skip to content

fix(array): don't abort on a NUL byte in a field name#8664

Open
miniex wants to merge 1 commit into
vortex-data:developfrom
miniex:fix/reject-nul-field-names
Open

fix(array): don't abort on a NUL byte in a field name#8664
miniex wants to merge 1 commit into
vortex-data:developfrom
miniex:fix/reject-nul-field-names

Conversation

@miniex

@miniex miniex commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

A struct field name with an interior NUL byte aborted the whole process (SIGABRT) when the schema was exported across the Arrow C Data FFI: arrow-rs copies the name into a CString in a non-unwinding context, so CString::new failing on the NUL escalated to an abort instead of an error (#8652). to_arrow_schema / to_data_type_naive and ArrowSession::to_arrow_field now reject a NUL byte in a field name up front, so a crafted or mislabeled file surfaces a recoverable VortexError instead of taking down the reader.

This rejects only NUL, the byte that actually aborts (other control characters are valid in a CString), and guards the Arrow export boundary rather than the writer, so it also covers a DType from a non-Vortex producer.

Closes: #8652

Testing

Added tests that to_arrow_schema (top-level and nested struct) and ArrowSession::to_arrow_field reject a NUL field name. cargo nextest run -p vortex-array passes; fmt --all + clippy --all-targets --all-features clean.


I'm Korean, so sorry if any wording reads a little awkward.

an interior NUL in a struct field name aborted the process when the schema was
exported over the arrow c ffi: arrow copies the name into a `CString` in a
non-unwinding context, so the failure escalated to `SIGABRT`. `to_arrow_schema`
and `ArrowSession::to_arrow_field` now reject such names, returning a `VortexError`
instead.

Closes vortex-data#8652

Signed-off-by: Han Damin <miniex@daminstudio.net>
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.

NUL byte in a struct field name aborts the process (SIGABRT) via Arrow FFI schema export

1 participant