This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new dd6ed5a9a7 [fix](function)fix string split function buffer overflow (#12834) dd6ed5a9a7 is described below commit dd6ed5a9a7f415f72fb67005d5c7c982db3bc00f Author: starocean999 <40539150+starocean...@users.noreply.github.com> AuthorDate: Sat Sep 24 17:32:00 2022 +0800 [fix](function)fix string split function buffer overflow (#12834) --- be/src/vec/functions/function_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/vec/functions/function_string.h b/be/src/vec/functions/function_string.h index 0bd1dac58f..c6294a08c4 100644 --- a/be/src/vec/functions/function_string.h +++ b/be/src/vec/functions/function_string.h @@ -1013,7 +1013,7 @@ public: int32_t num = 0; while (num < part_number) { pre_offset = offset; - size_t n = str.size - offset; + size_t n = str.size - offset - 1; const char* pos = reinterpret_cast<const char*>( memchr(str.data + offset + 1, delimiter_str[0], n)); if (pos != nullptr) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org