You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2019/08/17 20:27:16 UTC
[arrow] branch master updated: ARROW-6270: [C++] check buffer_index
bounds in IpcComponentSource.GetBuffer
This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 3564c87 ARROW-6270: [C++] check buffer_index bounds in IpcComponentSource.GetBuffer
3564c87 is described below
commit 3564c8713c8f63d87880921e55d8e18c602095e1
Author: Marco Neumann <ma...@crepererum.net>
AuthorDate: Sat Aug 17 15:27:03 2019 -0500
ARROW-6270: [C++] check buffer_index bounds in IpcComponentSource.GetBuffer
Closes #5105 from crepererum/ARROW-6270 and squashes the following commits:
a298dc1d7 <Marco Neumann> check buffer_index bounds in IpcComponentSource.GetBuffer
Authored-by: Marco Neumann <ma...@crepererum.net>
Signed-off-by: Wes McKinney <we...@apache.org>
---
cpp/src/arrow/ipc/reader.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/cpp/src/arrow/ipc/reader.cc b/cpp/src/arrow/ipc/reader.cc
index 648bb89..7072769 100644
--- a/cpp/src/arrow/ipc/reader.cc
+++ b/cpp/src/arrow/ipc/reader.cc
@@ -104,6 +104,9 @@ class IpcComponentSource {
return Status::IOError(
"Buffers-pointer of flatbuffer-encoded RecordBatch is null.");
}
+ if (buffer_index >= static_cast<int>(buffers->size())) {
+ return Status::IOError("buffer_index out of range.");
+ }
const flatbuf::Buffer* buffer = buffers->Get(buffer_index);
if (buffer->length() == 0) {