提交 63339677 编写于 作者: N nan-xiansen 提交者: 余明星

fixed 7c22e87b from https://gitee.com/mingxingyu/xts_acts/pulls/393

【kernel_lite】【master】fix security alarm:net_posix#ActsNetTest.cpp
Signed-off-by: Nnan-xiansen <nanjinbin@huawei.com>
Change-Id: I586c2db6ec128aea47d62d1e2f49614345862179
上级 d5986632
......@@ -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.
先完成此消息的编辑!
想要评论请 注册