提交 4001d592 编写于 作者: X xywang

[TS-654]<fix>: added one more check

上级 50ba26a1
......@@ -489,7 +489,7 @@ static int taosReadTcpData(SFdObj *pFdObj, SRecvInfo *pInfo) {
msgLen = (int32_t)htonl((uint32_t)rpcHead.msgLen);
int32_t size = msgLen + tsRpcOverhead;
// TODO: reason not found yet, workaround to avoid first
if (size < 0) {
if (msgLen <= 0 || size < 0) {
tError("%s %p invalid size for malloc, msgLen:%d, size:%d", pThreadObj->label, pFdObj->thandle, msgLen, size);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册