This is an automated email from the ASF dual-hosted git repository. apitrou 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 953009f ARROW-10348: [C++] Fix crash on invalid Parquet data 953009f is described below commit 953009fd509cd5bfae0cb0aa6ed4e0c82b950419 Author: Antoine Pitrou <anto...@python.org> AuthorDate: Mon Oct 19 19:17:34 2020 +0200 ARROW-10348: [C++] Fix crash on invalid Parquet data Found by OSS-Fuzz. Should fix the following issue: * https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26422 Closes #8490 from pitrou/ARROW-10348-parquet-fuzz-fix Authored-by: Antoine Pitrou <anto...@python.org> Signed-off-by: Antoine Pitrou <anto...@python.org> --- cpp/src/parquet/arrow/reader.cc | 4 ++++ testing | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/src/parquet/arrow/reader.cc b/cpp/src/parquet/arrow/reader.cc index 76fe7e6..0f4e218 100644 --- a/cpp/src/parquet/arrow/reader.cc +++ b/cpp/src/parquet/arrow/reader.cc @@ -540,6 +540,10 @@ class ListReader : public ColumnReaderImpl { virtual ::arrow::Result<std::shared_ptr<ChunkedArray>> AssembleArray( std::shared_ptr<ArrayData> data) { + if (field_->type()->id() == ::arrow::Type::MAP) { + // Error out if data is not map-compliant instead of aborting in MakeArray below + RETURN_NOT_OK(::arrow::MapArray::ValidateChildData(data->child_data)); + } std::shared_ptr<Array> result = ::arrow::MakeArray(data); return std::make_shared<ChunkedArray>(result); } diff --git a/testing b/testing index 860376d..90e15c6 160000 --- a/testing +++ b/testing @@ -1 +1 @@ -Subproject commit 860376d4e586a3ac34ec93089889da624ead6c2a +Subproject commit 90e15c6bd4fc50eb8cac6ee35cc3ab43807cfabe