Fix heap-buffer-overflow in split_part() function in StringFunctions (#1482)

This commit is contained in:
lichaoyong
2019-07-15 23:00:37 +08:00
committed by ZHAO Chun
parent 6c246418fb
commit a9e8113b82
3 changed files with 0 additions and 12 deletions

View File

@ -796,7 +796,6 @@ StringVal StringFunctions::split_part(FunctionContext* context, const StringVal&
return StringVal::null();
}
std::vector<int> find(field.val, -1); //store substring position
for (int i = 0; i <= field.val; i++) find[i] = -1; // init
int from = 0;
for (int i = 1; i <= field.val; i++) { // find
int last_index = i - 1;