fuzz: use SOCK_STREAM instead of SOCK_DGRAM

Fixes oss-fuzz#10734.
This commit is contained in:
Yu Watanabe 2018-11-12 01:56:08 +09:00
parent 89c7e7aa97
commit c0e3d79970
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@
static int test_fd[2] = { -1, -1 };
int lldp_network_bind_raw_socket(int ifindex) {
if (socketpair(AF_UNIX, SOCK_DGRAM | SOCK_NONBLOCK, 0, test_fd) < 0)
if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0, test_fd) < 0)
return -errno;
return test_fd[0];

View File

@ -13,7 +13,7 @@
static int test_fd[2];
int icmp6_bind_router_solicitation(int index) {
assert_se(socketpair(AF_UNIX, SOCK_DGRAM, 0, test_fd) >= 0);
assert_se(socketpair(AF_UNIX, SOCK_STREAM, 0, test_fd) >= 0);
return test_fd[0];
}