Skip to content

Commit

Permalink
handle bad index
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroshade committed Jul 1, 2024
1 parent 12499d6 commit 872324c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/arrow/ipc/writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ class RecordBatchSerializer {
auto data = array.value_data();

int64_t total_data_bytes = 0;
if (value_offsets) {
if (value_offsets && array.length() > 0) {
offset_type last_offset_value;
RETURN_NOT_OK(MemoryManager::CopyBufferSliceToCPU(
value_offsets, array.length() * sizeof(offset_type), sizeof(offset_type),
Expand Down

0 comments on commit 872324c

Please sign in to comment.