未验证 提交 0e9a8c0b 编写于 作者: H haojun Liao 提交者: GitHub

Merge pull request #1320 from taosdata/feature/slguan

invalid memory write while authorization failed
......@@ -1333,7 +1333,6 @@ _rsp:
pRsp->code = code;
pMsg += sizeof(STaosRsp);
if (code == 0) {
pConnectRsp = (SConnectRsp *)pRsp->more;
sprintf(pConnectRsp->acctId, "%x", pConn->pAcct->acctId);
strcpy(pConnectRsp->version, version);
......@@ -1362,7 +1361,9 @@ _rsp:
*((uint32_t *)pMsg) = tsTimePrecision;
pMsg += sizeof(uint32_t);
} else {
if (code != 0) {
pConnectRsp->writeAuth = 0;
pConnectRsp->superAuth = 0;
pConn->pAcct = NULL;
pConn->pUser = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册