This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.0 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit 699d0659fe61b7575673e49e2e799e0d8631bec1 Author: zuochunwei <zchw...@qq.com> AuthorDate: Sat Feb 26 17:05:58 2022 +0800 [fix](olap) add check statement to protect get_dict_word_info() from crash (#8241) check _num_elems firstly at the beginning of get_dict_word_info for safe --- be/src/olap/rowset/segment_v2/binary_plain_page.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/be/src/olap/rowset/segment_v2/binary_plain_page.h b/be/src/olap/rowset/segment_v2/binary_plain_page.h index 2060bd5..061884f 100644 --- a/be/src/olap/rowset/segment_v2/binary_plain_page.h +++ b/be/src/olap/rowset/segment_v2/binary_plain_page.h @@ -269,6 +269,8 @@ public: } void get_dict_word_info(StringRef* dict_word_info) { + if (_num_elems <= 0) [[unlikely]] return; + char* data_begin = (char*)&_data[0]; char* offset_ptr = (char*)&_data[_offsets_pos]; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org