提交 7c22e87b 编写于 作者: N nan-xiansen

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

Signed-off-by: Nnan-xiansen <nanjinbin@huawei.com>
Change-Id: I586c2db6ec128aea47d62d1e2f49614345862179
上级 1effbc03
......@@ -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.
先完成此消息的编辑!
想要评论请 注册