]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fuzz: use SOCK_STREAM instead of SOCK_DGRAM
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 11 Nov 2018 16:56:08 +0000 (01:56 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 11 Nov 2018 16:56:17 +0000 (01:56 +0900)
Fixes oss-fuzz#10734.

src/fuzz/fuzz-lldp.c
src/fuzz/fuzz-ndisc-rs.c

index e88632cfe627a186c115db998fad6f6680779bcd..db79371797446d005f8c19773cd348cdbe071b89 100644 (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];
index 7f2d8f864968704e1f6a9ade4c25120951eba702..8a692149e68a7955baaad7a92ad0d61afe9d42b4 100644 (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];
 }