安全函数和指针赋值修改
This commit is contained in:
@ -3706,7 +3706,7 @@ static IndexStmt* transformIndexConstraint(Constraint* constraint, CreateStmtCon
|
||||
} else if (attnum == 0) {
|
||||
// expresional index
|
||||
Node *indexkey = NULL;
|
||||
attform = 0;
|
||||
attform = NULL;
|
||||
|
||||
if (indexpr_item == NULL) {
|
||||
ereport(ERROR,
|
||||
|
||||
@ -4916,6 +4916,7 @@ Datum generate_series_timestamptz(PG_FUNCTION_ARGS)
|
||||
Interval* step = PG_GETARG_INTERVAL_P(2);
|
||||
MemoryContext oldcontext;
|
||||
Interval interval_zero;
|
||||
errno_t rc;
|
||||
|
||||
/* create a function context for cross-call persistence */
|
||||
funcctx = SRF_FIRSTCALL_INIT();
|
||||
@ -4937,7 +4938,8 @@ Datum generate_series_timestamptz(PG_FUNCTION_ARGS)
|
||||
fctx->step = *step;
|
||||
|
||||
/* Determine sign of the interval */
|
||||
MemSet(&interval_zero, 0, sizeof(Interval));
|
||||
rc = memset_s(&interval_zero, sizeof(Interval), 0, sizeof(Interval));
|
||||
securec_check(rc, "\0", "\0");
|
||||
fctx->step_sign = interval_cmp_internal(&fctx->step, &interval_zero);
|
||||
|
||||
if (fctx->step_sign == 0)
|
||||
|
||||
@ -161,7 +161,7 @@ extern void PushErrorV(int errorCode, int severity, const char* file, int line,
|
||||
va_list args2;
|
||||
va_copy(args2, args);
|
||||
errno_t erc = vsnprintf_truncated_s(errorFrame->m_errorMessage, MOT_MAX_ERROR_MESSAGE, format, args2);
|
||||
securec_check_ss(erc, "\0", "\0");
|
||||
securec_check_ss_c(erc, "\0", "\0");
|
||||
errorFrame->m_errorMessage[MOT_MAX_ERROR_MESSAGE - 1] = 0;
|
||||
++errorFrameCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user