Skip to content

Commit

Permalink
Bugfix: heap-buffer-overflow when querying array (StarRocks#921)
Browse files Browse the repository at this point in the history
Close issue StarRocks#920

Cannot rely on `array_reader->is_nullable()` before `array_reader` been
initialized.
  • Loading branch information
sduzh authored Oct 28, 2021
1 parent 6e479d9 commit db203d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/storage/rowset/segment_v2/column_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Status ColumnReader::create(MemTracker* mem_tracker, const ColumnReaderOptions&
col++;
array_reader->_sub_readers->emplace_back(std::move(element_reader));

if (array_reader->is_nullable()) {
if (meta->is_nullable()) {
std::unique_ptr<ColumnReader> null_reader;
RETURN_IF_ERROR(ColumnReader::create(mem_tracker, opts, meta->mutable_children_columns(col), file_name,
&null_reader));
Expand Down

0 comments on commit db203d1

Please sign in to comment.