Skip to content

Commit

Permalink
[Bugfix](string_functions) fix heap-buffer-overflow on find_in_set (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzhg authored Sep 15, 2022
1 parent 47d43b3 commit d8b6f09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/exprs/string_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d8b6f09

Please sign in to comment.