提交 c6464c03 编写于 作者: O openharmony_ci 提交者: Gitee

!393 【kernel_lite】【master】fix security alarm:net_posix#ActsNetTest.cpp

Merge pull request !393 from 南先森/kernel_lite
......@@ -245,7 +245,7 @@ static void* SampleTcpServerTask(void *p)
iov[0].iov_base = bufrec;
iov[0].iov_len = sizeof(bufrec);
ret = recvmsg(clnFd, &msg, 0);
if (len * strlen(g_cliMsg) == (unsigned int)ret) {
if (len * strlen(g_cliMsg) == (unsigned int)ret && ret >= 0) {
bufrec[ret] = 0;
printf("[tcp server]recvmsg on socket %d:%d, msg[%s]\n", clnFd, ret, buf);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册