[Bugfix](string_functions) fix heap-buffer-overflow on find_in_set (#12613)
This commit is contained in:
@ -710,7 +710,7 @@ IntVal StringFunctions::find_in_set(FunctionContext* context, const StringVal& s
|
||||
do {
|
||||
end = start;
|
||||
// Position end.
|
||||
while (str_set.ptr[end] != ',' && end < str_set.len) {
|
||||
while (end < str_set.len && str_set.ptr[end] != ',') {
|
||||
++end;
|
||||
}
|
||||
StringValue token(reinterpret_cast<char*>(str_set.ptr) + start, end - start);
|
||||
|
||||
Reference in New Issue
Block a user