[fix](function)fix string split function buffer overflow (#12834)
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user