aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/jabber.c
diff options
context:
space:
mode:
authorDisconnect3d <dominik.b.czarnota@gmail.com>2020-04-13 16:35:03 +0200
committerGitHub <noreply@github.com>2020-04-13 16:35:03 +0200
commitfa15e170b41d9b1d301819eb46bc7f3fb32df297 (patch)
tree7f09942ec5dd51894a4ec945360affe460291457 /src/lib/protocols/jabber.c
parentd665df64e297051cd5b48605974846fa7076d883 (diff)
Fix incorrect "<iq from=\"' parsing
This PR fixes a wrong size arg passed to memcmp when checking for "<iq from=\"" and "<iq from \'" strings.
Diffstat (limited to 'src/lib/protocols/jabber.c')
-rw-r--r--src/lib/protocols/jabber.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/jabber.c b/src/lib/protocols/jabber.c
index 6ee96e5af..9302f84d7 100644
--- a/src/lib/protocols/jabber.c
+++ b/src/lib/protocols/jabber.c
@@ -135,7 +135,7 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
return;
}
/* need message to or type for file-transfer */
- if (memcmp(packet->payload, "<iq from=\"", 8) == 0 || memcmp(packet->payload, "<iq from=\'", 8) == 0) {
+ if (memcmp(packet->payload, "<iq from=\"", 10) == 0 || memcmp(packet->payload, "<iq from=\'", 10) == 0) {
NDPI_LOG_DBG2(ndpi_struct, "JABBER <iq from=\"\n");
lastlen = packet->payload_packet_len - 11;
for (x = 10; x < lastlen; x++) {