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 76c3e4a  ARROW-8671: [C++][FOLLOWUP] Fix ASAN/UBSAN bug found with IPC 
fuzz testing files
76c3e4a is described below

commit 76c3e4a6d30e279fa5707f7cc14e8aacf00f08a3
Author: Wes McKinney <[email protected]>
AuthorDate: Sun Jun 28 21:39:36 2020 -0500

    ARROW-8671: [C++][FOLLOWUP] Fix ASAN/UBSAN bug found with IPC fuzz testing 
files
    
    Closes #7575 from wesm/ARROW-8671-asan-ubsan
    
    Authored-by: Wes McKinney <[email protected]>
    Signed-off-by: Wes McKinney <[email protected]>
---
 cpp/src/arrow/ipc/reader.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpp/src/arrow/ipc/reader.cc b/cpp/src/arrow/ipc/reader.cc
index 877ab69..d35236c 100644
--- a/cpp/src/arrow/ipc/reader.cc
+++ b/cpp/src/arrow/ipc/reader.cc
@@ -655,6 +655,8 @@ Status ReadDictionary(const Buffer& metadata, 
DictionaryMemo* dictionary_memo,
   // The dictionary is embedded in a record batch with a single column
   auto batch_meta = dictionary_batch->data();
 
+  CHECK_FLATBUFFERS_NOT_NULL(batch_meta, "DictionaryBatch.data");
+
   Compression::type compression;
   RETURN_NOT_OK(GetCompression(batch_meta, &compression));
   if (compression == Compression::UNCOMPRESSED &&
@@ -673,8 +675,6 @@ Status ReadDictionary(const Buffer& metadata, 
DictionaryMemo* dictionary_memo,
 
   auto value_field = ::arrow::field("dummy", value_type);
 
-  CHECK_FLATBUFFERS_NOT_NULL(batch_meta, "DictionaryBatch.data");
-
   std::shared_ptr<RecordBatch> batch;
   ARROW_ASSIGN_OR_RAISE(
       batch, LoadRecordBatch(batch_meta, ::arrow::schema({value_field}),

Reply via email to