diff options
author | Luca Deri <deri@ntop.org> | 2019-07-11 22:49:24 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2019-07-11 22:49:24 +0200 |
commit | 4ac60d88d754da4058bb9dfdc7507be7243ba7fc (patch) | |
tree | 6d6a339e24c40c56b0bd0b5c9eca17a11a3be9a0 /src/lib/protocols/stun.c | |
parent | 3e2e6165077c82fb955a1efe68d2a16db3c52462 (diff) |
Improved whatsapp dissection
Diffstat (limited to 'src/lib/protocols/stun.c')
-rw-r--r-- | src/lib/protocols/stun.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c index cf03ddaec..3e2e037f2 100644 --- a/src/lib/protocols/stun.c +++ b/src/lib/protocols/stun.c @@ -81,7 +81,9 @@ static ndpi_int_stun_t ndpi_int_check_stun(struct ndpi_detection_module_struct * msg_type, payload_length, flow->protos.stun_ssl.stun.num_binding_requests); */ - if(((payload[0] == 0x80) && ((msg_len+20) <= payload_length)) /* WhatsApp Voice */) { + if(((payload[0] == 0x80) + && (payload_length < 512) + && ((msg_len+20) <= payload_length)) /* WhatsApp Voice */) { *is_whatsapp = 1; return NDPI_IS_STUN; /* This is WhatsApp Voice */ } else if((payload[0] == 0x90) |