Fix traverse does not check overflow resulting in stack overflow
This commit is contained in:
@ -62,8 +62,16 @@ int ObPsSqlParamHelper::traverse(
|
|||||||
TraverseContext& ctx, ObIArray<int64_t>& no_check_type_offsets, ObIArray<int64_t>& not_param_offsets)
|
TraverseContext& ctx, ObIArray<int64_t>& no_check_type_offsets, ObIArray<int64_t>& not_param_offsets)
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
if (OB_ISNULL(ctx.node_)) {
|
bool is_overflow = false;
|
||||||
// ignore
|
if (OB_FAIL(check_stack_overflow(is_overflow))) {
|
||||||
|
LOG_WARN("failed to check stack overflow", K(ret));
|
||||||
|
} else if (is_overflow) {
|
||||||
|
ret = OB_SIZE_OVERFLOW;
|
||||||
|
LOG_WARN("too deep recusive", K(ret));
|
||||||
|
}
|
||||||
|
if (OB_FAIL(ret)) {
|
||||||
|
} else if (OB_ISNULL(ctx.node_)) {
|
||||||
|
//ignore
|
||||||
} else {
|
} else {
|
||||||
bool is_set = false;
|
bool is_set = false;
|
||||||
const ParseNode& parent = *ctx.node_;
|
const ParseNode& parent = *ctx.node_;
|
||||||
|
|||||||
Reference in New Issue
Block a user