apache / apache/arrow

[C++] Null pointer dereference in SimpleTable constructor

Open
#49,079 0 comments 0 reactions 1 assignee Claimed by @AliRana30 View on GitHub
Component: C++ Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug

SimpleTable constructor dereferences `columns_[0]` without null check when `num_rows < 0`. If the first column pointer is null, this causes undefined behavior/segfault at lines 66-70 and 80-84 in [cpp/src/arrow/table.cc](cci:7://file:///C:/Users/PMLS/Desktop/apache/arrow/cpp/src/arrow/table.cc:0:0-0:0).

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.