You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ks...@apache.org on 2020/10/19 18:01:25 UTC
[arrow] 30/30: ARROW-10348: [C++] Fix crash on invalid Parquet data
This is an automated email from the ASF dual-hosted git repository.
kszucs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
commit 04660f8afbf5bee052f8881b36b5c59a8c8ca7b5
Author: Antoine Pitrou <an...@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 <an...@python.org>
Signed-off-by: Antoine Pitrou <an...@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