Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListArray::from(ArrayData) dereferences invalid pointer when offsets are empty #1601

Closed
jhorstmann opened this issue Apr 20, 2022 · 0 comments · Fixed by #1602
Closed

ListArray::from(ArrayData) dereferences invalid pointer when offsets are empty #1601

jhorstmann opened this issue Apr 20, 2022 · 0 comments · Fixed by #1602
Labels
arrow Changes to the arrow crate bug

Comments

@jhorstmann
Copy link
Contributor

jhorstmann commented Apr 20, 2022

Describe the bug

ListArray::from(ArrayData) tries to validate that the first offset is zero, without checking that the offset buffer actually contains any data. This leads to a segmentation fault when creating an empty ListArray.

Additionally this validation should not really be needed, starting from a non-zero offset should work fine.

To Reproduce
Create an ArrayData object with list type and an empty offset buffer.

Expected behavior
The ListArray creation should succeed, resulting in an empty array.

Additional context
Related to #1545 since validation already happened when creating the ArrayData struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants