aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca Deri <lucaderi@users.noreply.github.com>2020-04-15 08:35:59 +0200
committerGitHub <noreply@github.com>2020-04-15 08:35:59 +0200
commit794f7fa124f1e6bb3c0927b0dd1cc80c1cdbaecb (patch)
tree677e9af1c511161b38716a55d1f470da6928b9bc /src
parentd3b4b81d6fd9adc5bbe6c04e45d51989bacd4102 (diff)
parentb75838b771f89ede07067b4e51471c197a53dd16 (diff)
Merge pull request #868 from disconnect3d/patch-1
Fix off by one when checking for "GET / HTTP" string
Diffstat (limited to 'src')
-rw-r--r--src/lib/protocols/gnutella.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/gnutella.c b/src/lib/protocols/gnutella.c
index 77d7691c3..68313d668 100644
--- a/src/lib/protocols/gnutella.c
+++ b/src/lib/protocols/gnutella.c
@@ -125,7 +125,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
}
}
}
- if (packet->payload_packet_len > 50 && ((memcmp(packet->payload, "GET / HTTP", 9) == 0))) {
+ if (packet->payload_packet_len > 50 && ((memcmp(packet->payload, "GET / HTTP", 10) == 0))) {
ndpi_parse_packet_line_info(ndpi_struct, flow);
if ((packet->user_agent_line.ptr != NULL && packet->user_agent_line.len > 15
&& memcmp(packet->user_agent_line.ptr, "BearShare Lite ", 15) == 0)