diff options
author | Disconnect3d <dominik.b.czarnota@gmail.com> | 2020-04-13 16:35:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 16:35:03 +0200 |
commit | fa15e170b41d9b1d301819eb46bc7f3fb32df297 (patch) | |
tree | 7f09942ec5dd51894a4ec945360affe460291457 /src/lib/protocols/jabber.c | |
parent | d665df64e297051cd5b48605974846fa7076d883 (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.c | 2 |
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++) { |