Light-City opened a new issue, #36949:
URL: https://github.com/apache/arrow/issues/36949

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   
   ```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 equal kMaxBuffers, will the buffers_boundary be exceeded?
   
   So,this is a bug?
   
   
   index should [0,1, 2] but not include 3
   
   ### 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]

Reply via email to