!4180 memcheck包执行ci用例,json.cpp中json_build_array函数中存在溢出风险

Merge pull request !4180 from 姜岩/master
This commit is contained in:
opengauss_bot
2023-09-21 00:58:47 +00:00
committed by Gitee

View File

@ -1892,7 +1892,6 @@ Datum json_build_array(PG_FUNCTION_ARGS)
appendStringInfoChar(result, '['); appendStringInfoChar(result, '[');
for (i = 0; i < nargs; i++) { for (i = 0; i < nargs; i++) {
val_type = get_fn_expr_argtype(fcinfo->flinfo, i); val_type = get_fn_expr_argtype(fcinfo->flinfo, i);
arg = PG_GETARG_DATUM(i + 1);
/* see comments in json_build_object above */ /* see comments in json_build_object above */
if (val_type == UNKNOWNOID && get_fn_expr_arg_stable(fcinfo->flinfo, i)) { if (val_type == UNKNOWNOID && get_fn_expr_arg_stable(fcinfo->flinfo, i)) {
val_type = TEXTOID; val_type = TEXTOID;