From 48a7f6d487862a392bad65e9e2797e6c4874f8cb Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:49:11 +0100 Subject: fuzz: some enhancements (#1827) Load some custom configuration (like in the unit tests) and factorize some (fuzzing) common code. There is no way to pass file paths to the fuzzers as parameters. The safe solution seems to be to load them from the process working dir. Anyway, missing file is not a blocking error. Remove some dead code (found looking at the coverage report) --- src/lib/protocols/someip.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/lib/protocols/someip.c') diff --git a/src/lib/protocols/someip.c b/src/lib/protocols/someip.c index 6409f175d..8d7baa230 100644 --- a/src/lib/protocols/someip.c +++ b/src/lib/protocols/someip.c @@ -108,21 +108,12 @@ void ndpi_search_someip (struct ndpi_detection_module_struct *ndpi_struct, NDPI_LOG_DBG(ndpi_struct, "search SOME/IP\n"); - if (flow->detected_protocol_stack[0] != NDPI_PROTOCOL_UNKNOWN) { - return; - } - //we extract the Message ID and Request ID and check for special cases later u_int32_t message_id = ntohl(someip_data_cover_32(&packet->payload[0])); u_int32_t request_id = ntohl(someip_data_cover_32(&packet->payload[8])); NDPI_LOG_DBG2(ndpi_struct, "====>>>> SOME/IP Message ID: %08x [len: %u]\n", message_id, packet->payload_packet_len); - if (packet->payload_packet_len < 16) { - NDPI_LOG_DBG(ndpi_struct, "Excluding SOME/IP .. mandatory header not found\n"); - NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SOMEIP); - return; - } //####Maximum packet size in SOMEIP depends on the carrier protocol, and I'm not certain how well enforced it is, so let's leave that for round 2#### -- cgit v1.2.3