Added check for spotify payload lenght

This commit is contained in:
Luca Deri
2020-06-01 16:36:12 +02:00
parent 16dc0ec29e
commit 241af016e9
+1 -1
View File
@@ -47,7 +47,7 @@ static void ndpi_check_spotify(struct ndpi_detection_module_struct *ndpi_struct,
if((packet->udp->source == spotify_port)
&& (packet->udp->dest == spotify_port)) {
if(payload_len > 2) {
if(payload_len >= 7) {
if(memcmp(packet->payload, "SpotUdp", 7) == 0) {
NDPI_LOG_INFO(ndpi_struct, "found spotify udp dissector\n");
ndpi_int_spotify_add_connection(ndpi_struct, flow, 0);