提交 4bc48166 编写于 作者: dengyihao's avatar dengyihao

fix crash DDL

上级 457c544d
...@@ -405,7 +405,7 @@ static void clientWrite(SCliConn* pConn) { ...@@ -405,7 +405,7 @@ static void clientWrite(SCliConn* pConn) {
pConn->secured = 1; // del later pConn->secured = 1; // del later
pHead = (STransMsgHead*)buf; pHead = (STransMsgHead*)buf;
pHead->secured = 0; pHead->secured = 1;
msgLen += sizeof(STransUserMsg); msgLen += sizeof(STransUserMsg);
} }
......
...@@ -231,7 +231,7 @@ static void uvHandleReq(SSrvConn* pConn) { ...@@ -231,7 +231,7 @@ static void uvHandleReq(SSrvConn* pConn) {
p->chandle = NULL; p->chandle = NULL;
STransMsgHead* pHead = (STransMsgHead*)p->msg; STransMsgHead* pHead = (STransMsgHead*)p->msg;
if (pHead->secured == 0) { if (pHead->secured == 1) {
STransUserMsg* uMsg = (p->msg + p->msgLen - sizeof(STransUserMsg)); STransUserMsg* uMsg = (p->msg + p->msgLen - sizeof(STransUserMsg));
memcpy(pConn->user, uMsg->user, tListLen(uMsg->user)); memcpy(pConn->user, uMsg->user, tListLen(uMsg->user));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册