aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/z3950.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-07-12 14:22:25 +0200
committerGitHub <noreply@github.com>2024-07-12 14:22:25 +0200
commitc3ba65311e2cf4aba8b51cdb6800a5654ef1d060 (patch)
tree7f0aa30fc4ab1d0aaec75f08b84cb7f3705d29fa /src/lib/protocols/z3950.c
parent456f0fd4279ae727831a80c506a343b8a9aedd90 (diff)
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)
Diffstat (limited to 'src/lib/protocols/z3950.c')
-rw-r--r--src/lib/protocols/z3950.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/z3950.c b/src/lib/protocols/z3950.c
index 96ae80560..92eed01b0 100644
--- a/src/lib/protocols/z3950.c
+++ b/src/lib/protocols/z3950.c
@@ -42,7 +42,7 @@ static int z3950_parse_sequences(struct ndpi_packet_struct const * const packet,
pdu_type = packet->payload[0] & 0x1F;
- if(((pdu_type < 20) || (pdu_type > 36)) && ((pdu_type < 43) || (pdu_type > 48)))
+ if((pdu_type < 20) || ((pdu_type > 36) && ((pdu_type < 43) || (pdu_type > 48))))
return(-1);
while(cur_sequences++ < max_sequences) {