fuzz: commit test case for oss-fuzz issue 6884

This seems to be a false positive in msan:
https://github.com/google/sanitizers/issues/767.

I don't see anything wrong with the code either, and valgrind does not see the
issue. Anyway, let's add the test case.

We don't have msan hooked up yet, but hopefully we'll in the future.

oss-fuzz #6884.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-03-14 14:31:24 +01:00
parent 52d4d1d339
commit 8d89e51f3c
3 changed files with 7 additions and 0 deletions

View File

@ -118,6 +118,9 @@ static void test_socket_address_parse_netlink(void) {
assert_se(socket_address_parse_netlink(&a, "route 10") >= 0);
assert_se(a.sockaddr.sa.sa_family == AF_NETLINK);
assert_se(a.protocol == NETLINK_ROUTE);
/* oss-fuzz #6884 */
assert_se(socket_address_parse_netlink(&a, "\xff") < 0);
}
static void test_socket_address_equal(void) {

View File

@ -0,0 +1,3 @@
socket
[Socket]
ListenNetlink=ÿ

View File

@ -29,4 +29,5 @@ sanitizers = [['address', sanitize_address]]
fuzz_regression_tests = '''
fuzz-dns-packet/oss-fuzz-5465
fuzz-dns-packet/issue-7888
fuzz-unit-file/oss-fuzz-6884
'''.split()