提交 65ae4546 编写于 作者: O openharmony_ci 提交者: Gitee

!534 fix security alarm:net_posix#ActsNetTest.cpp

Merge pull request !534 from 余明星/cherry-pick-1630995866
......@@ -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.
先完成此消息的编辑!
想要评论请 注册