sfc-gh-ebrossard opened a new issue, #36913: URL: https://github.com/apache/arrow/issues/36913
### Describe the bug, including details regarding any error messages, version, and platform. If `buffer->data()` is `nullptr` [here](https://github.com/apache/arrow/blob/main/cpp/src/arrow/buffer.cc#L216), `ConcatenateBuffers` calls `std::memcpy` with `nullptr` for the `src` argument, which is [undefined behavior](https://en.cppreference.com/w/cpp/string/byte/memcpy): > If either dest or src is an [invalid or null pointer](https://en.cppreference.com/w/cpp/language/pointer#Pointers), the behavior is undefined, even if count is zero. The simplest fix is probably to skip the `std::memcpy` call if the buffer has zero length. ### Component(s) C++ -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
