Merge pull request #4868 from taosdata/fix-varargs-crash
varargs/fix: DONOT use varargs functions without %s to print a string
This commit is contained in:
commit
0faa832c0f
|
@ -95,7 +95,7 @@ void taos_query_a(TAOS *taos, const char *sqlstr, __async_cb_func_t fp, void *pa
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nPrintTsc(sqlstr);
|
nPrintTsc("%s", sqlstr);
|
||||||
|
|
||||||
SSqlObj *pSql = (SSqlObj *)calloc(1, sizeof(SSqlObj));
|
SSqlObj *pSql = (SSqlObj *)calloc(1, sizeof(SSqlObj));
|
||||||
if (pSql == NULL) {
|
if (pSql == NULL) {
|
||||||
|
|
|
@ -327,7 +327,7 @@ TAOS_RES* taos_query_c(TAOS *taos, const char *sqlstr, uint32_t sqlLen, int64_t*
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
nPrintTsc(sqlstr);
|
nPrintTsc("%s", sqlstr);
|
||||||
|
|
||||||
SSqlObj* pSql = calloc(1, sizeof(SSqlObj));
|
SSqlObj* pSql = calloc(1, sizeof(SSqlObj));
|
||||||
if (pSql == NULL) {
|
if (pSql == NULL) {
|
||||||
|
|
|
@ -181,7 +181,7 @@ void httpProcessMultiSql(HttpContext *pContext) {
|
||||||
char *sql = httpGetCmdsString(pContext, cmd->sql);
|
char *sql = httpGetCmdsString(pContext, cmd->sql);
|
||||||
httpTraceL("context:%p, fd:%d, user:%s, process pos:%d, start query, sql:%s", pContext, pContext->fd, pContext->user,
|
httpTraceL("context:%p, fd:%d, user:%s, process pos:%d, start query, sql:%s", pContext, pContext->fd, pContext->user,
|
||||||
multiCmds->pos, sql);
|
multiCmds->pos, sql);
|
||||||
nPrintHttp(sql);
|
nPrintHttp("%s", sql);
|
||||||
taos_query_a(pContext->session->taos, sql, httpProcessMultiSqlCallBack, (void *)pContext);
|
taos_query_a(pContext->session->taos, sql, httpProcessMultiSqlCallBack, (void *)pContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ void httpProcessSingleSqlCmd(HttpContext *pContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
httpTraceL("context:%p, fd:%d, user:%s, start query, sql:%s", pContext, pContext->fd, pContext->user, sql);
|
httpTraceL("context:%p, fd:%d, user:%s, start query, sql:%s", pContext, pContext->fd, pContext->user, sql);
|
||||||
nPrintHttp(sql);
|
nPrintHttp("%s", sql);
|
||||||
taos_query_a(pSession->taos, sql, httpProcessSingleSqlCallBack, (void *)pContext);
|
taos_query_a(pSession->taos, sql, httpProcessSingleSqlCallBack, (void *)pContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue