summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2024-04-03 15:55:31 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-04-03 19:42:21 +0200
commita33a636b486c975ace08557dcb0affe39cbf2b01 (patch)
tree55e0d399992a8705ccfddc54755347a50d8ddefa /src/libsystemd-network
parentman/examples: set _GNU_SOURCE in source, rather than by compile option (diff)
downloadsystemd-a33a636b486c975ace08557dcb0affe39cbf2b01.tar.xz
systemd-a33a636b486c975ace08557dcb0affe39cbf2b01.zip
fuzz: check that ND options are parsed sucessfully
At that point the options have been parsed, sent and received again so `ndisc_parse_options` should never fail there (unless ndisc_send corrupts them somehow). It's a follow-up to https://github.com/systemd/systemd/pull/31807
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/fuzz-ndisc-rs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/fuzz-ndisc-rs.c b/src/libsystemd-network/fuzz-ndisc-rs.c
index 8a720e628e..c52043a13b 100644
--- a/src/libsystemd-network/fuzz-ndisc-rs.c
+++ b/src/libsystemd-network/fuzz-ndisc-rs.c
@@ -62,7 +62,7 @@ static void test_with_icmp6_packet(const uint8_t *data, size_t size) {
if (icmp6_packet_receive(fd_pair[0], &packet) < 0)
return;
- (void) ndisc_parse_options(packet, &options);
+ assert_se(ndisc_parse_options(packet, &options) >= 0);
}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {