From c3ba65311e2cf4aba8b51cdb6800a5654ef1d060 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Fri, 12 Jul 2024 14:22:25 +0200 Subject: fuzzing: improve coverage (#2495) Fix detection of WebDAV and Gnutella (over HTTP) Fix detection of z3950 Add two fuzzers to test `ndpi_memmem()` and `ndpi_strnstr()` Remove some dead code: * RTP: the same exact check is performed at the very beginning of the function * MQTT: use a better helper to exclude the protocol * Colletd: `ndpi_hostname_sni_set()` never fails Update pl7m code (fix a Use-of-uninitialized-value error) --- src/lib/ndpi_main.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/lib/ndpi_main.c') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index b8dc08aab..ad07d0f86 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -7528,12 +7528,6 @@ static void ndpi_reconcile_protocols(struct ndpi_detection_module_struct *ndpi_s /* ********************************************************************************* */ -u_int32_t ip_port_hash_funct(u_int32_t ip, u_int16_t port) { - return(ip + 3 * port); -} - -/* ********************************************************************************* */ - /* #define BITTORRENT_CACHE_DEBUG */ int search_into_bittorrent_cache(struct ndpi_detection_module_struct *ndpi_struct, -- cgit v1.2.3