Skip to content

Commit adf7fb1

Browse files
authored
[Fix](load) Restrict the import of VARCHAR(0) data to avoid coredump (apache#40940)
The VARCHAR(0) created has an actual length of 0, and BE didn't restrict it, leading to a BE core dump. #[38427](apache#38427) changed VARCHAR(0) to have a length of 65533. This PR restricts data import when the length is 0 to avoid a core dump.
1 parent 158f0b2 commit adf7fb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

be/src/vec/sink/vtablet_block_convertor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Status OlapTableBlockConvertor::_internal_validate_column(
211211
auto string_column_checker = [&](const ColumnString* column_string) {
212212
size_t limit = config::string_type_length_soft_limit_bytes;
213213
// when type.len is negative, std::min will return overflow value, so we need to check it
214-
if (type.len > 0) {
214+
if (type.len >= 0) {
215215
limit = std::min(config::string_type_length_soft_limit_bytes, type.len);
216216
}
217217

0 commit comments

Comments
 (0)