Skip to content

Commit

Permalink
ARROW-8671: [C++][FOLLOWUP] Fix ASAN/UBSAN bug found with IPC fuzz te…
Browse files Browse the repository at this point in the history
…sting files

Closes #7575 from wesm/ARROW-8671-asan-ubsan

Authored-by: Wes McKinney <[email protected]>
Signed-off-by: Wes McKinney <[email protected]>
  • Loading branch information
wesm committed Jun 29, 2020
1 parent 97e72ee commit 76c3e4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/ipc/reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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}),
Expand Down

0 comments on commit 76c3e4a

Please sign in to comment.