You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/02/16 02:17:06 UTC
(doris) 08/08: [bugfix][be][cppcheck] Possible NULL pointer access (#31025) (#31026)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 0d4b8386a2e6b83541c75e0baa14b0e5704d30e2
Author: Vallish Pai <va...@gmail.com>
AuthorDate: Thu Feb 15 06:16:40 2024 +0530
[bugfix][be][cppcheck] Possible NULL pointer access (#31025) (#31026)
---
be/src/vec/exec/format/orc/vorc_reader.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/be/src/vec/exec/format/orc/vorc_reader.cpp b/be/src/vec/exec/format/orc/vorc_reader.cpp
index d1b908dbc22..95160c94037 100644
--- a/be/src/vec/exec/format/orc/vorc_reader.cpp
+++ b/be/src/vec/exec/format/orc/vorc_reader.cpp
@@ -2170,10 +2170,10 @@ MutableColumnPtr OrcReader::_convert_dict_column_to_string_column(
const int* dict_data = dict_column->get_data().data();
string_values.reserve(num_values);
size_t max_value_length = 0;
- auto* null_map_data = null_map->data();
if (orc_column_type->getKind() == orc::TypeKind::CHAR) {
// Possibly there are some zero padding characters in CHAR type, we have to strip them off.
if (null_map) {
+ auto* null_map_data = null_map->data();
for (int i = 0; i < num_values; ++i) {
if (!null_map_data[i]) {
char* val_ptr;
@@ -2207,6 +2207,7 @@ MutableColumnPtr OrcReader::_convert_dict_column_to_string_column(
}
} else {
if (null_map) {
+ auto* null_map_data = null_map->data();
for (int i = 0; i < num_values; ++i) {
if (!null_map_data[i]) {
char* val_ptr;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org