Skip to content

Commit

Permalink
fuzz: check that ND options are parsed sucessfully
Browse files Browse the repository at this point in the history
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 #31807
  • Loading branch information
evverx authored and yuwata committed Apr 3, 2024
1 parent 040cb66 commit a33a636
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsystemd-network/fuzz-ndisc-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a33a636

Please sign in to comment.