diff options
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) |