### light_array KeyColumnArray assert ```cpp uint8_t* mutable_data(int i) { ARROW_DCHECK(i >= 0 && i <= kMaxBuffers); return mutable_buffers_[i]; } /// \brief Return one of the underlying read-only buffers const uint8_t* data(int i) const { ARROW_DCHECK(i >= 0 && i <= kMaxBuffers); return buffers_[i]; } ``` `ARROW_DCHECK(i >= 0 && i <= kMaxBuffers);` may be wrong? ``` static constexpr int kMaxBuffers = 3; const uint8_t* buffers_[kMaxBuffers]; uint8_t* mutable_buffers_[kMaxBuffers]; ``` when `data(i)` i equl kMaxBuffers, will the buffers_boundary be exceeded? So,this is a bug? index should [0,1, 2] but not include 3 ### Component(s) C++
Activity
GH-36949: [C++] Fix KeyColumnArray's buffers array bounds assertion. (#…
apacheGH-36949: [C++] Fix KeyColumnArray's buffers array bounds asser…