提交 6fbcbb92 编写于 作者: M mlinlmcc 提交者: Gitee

修改不合法IP校验范围

上级 2b8654f1
......@@ -852,9 +852,8 @@ HWTEST_F(ActsLwipTest, testInetPtonIpv4Abnormal, Function | MediumTest | Level2)
{
int ret;
struct in_addr rst = {0};
char cpAddrs[10][16] = {"255", "256", "255.0", "255.0.0", "256.0.0.1", "a.a.a.a", "....", "#",
"127.0.0.f", "0:0:0:0:0:0:0:1"};
for (int i = 0; i < 10; i++) {
char cpAddrs[6][16] = {"256.0.0.1", "a.a.a.a", "....", "#", "127.0.0.f", "0:0:0:0:0:0:0:1"};
for (int i = 0; i < 6; i++) {
ret = inet_pton(AF_INET, cpAddrs[i], &rst);
EXPECT_EQ(0, ret) << "ErrInfo:inet_pton abnormal [" << cpAddrs[i] << "]";
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册