Potential dereference of nullptr
Open
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, including details regarding any error messages, version, and platform.
In the function https://github.com/apache/arrow/blob/d42c7ddcc233b8f372dfd7b74f51953517e16605/cpp/src/arrow/c/bridge.cc#L2615
The pointer self->producer was unsafely dereferenced after NULL check
https://github.com/apache/arrow/blob/d42c7ddcc233b8f372dfd7b74f51953517e16605/cpp/src/arrow/c/bridge.cc#L2618
https://github.com/apache/arrow/blob/d42c7ddcc233b8f372dfd7b74f51953517e16605/cpp/src/arrow/c/bridge.cc#L2632
It is likely that the check is not necessary but it could be a cause of a segmentation fault.
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.