fix crash DDL

This commit is contained in:
yihaoDeng 2022-02-12 14:17:08 +08:00
parent 457c544dc7
commit 4bc481663a
2 changed files with 2 additions and 2 deletions

View File

@ -405,7 +405,7 @@ static void clientWrite(SCliConn* pConn) {
pConn->secured = 1; // del later
pHead = (STransMsgHead*)buf;
pHead->secured = 0;
pHead->secured = 1;
msgLen += sizeof(STransUserMsg);
}

View File

@ -231,7 +231,7 @@ static void uvHandleReq(SSrvConn* pConn) {
p->chandle = NULL;
STransMsgHead* pHead = (STransMsgHead*)p->msg;
if (pHead->secured == 0) {
if (pHead->secured == 1) {
STransUserMsg* uMsg = (p->msg + p->msgLen - sizeof(STransUserMsg));
memcpy(pConn->user, uMsg->user, tListLen(uMsg->user));
}