From a11003298291884af6005bcd3b4bfd6308a85781 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Mon, 9 Dec 2024 21:08:24 +0100 Subject: [PATCH] Added missing check --- src/lib/protocols/stun.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c index 138308082c4..f7c1ab51215 100644 --- a/src/lib/protocols/stun.c +++ b/src/lib/protocols/stun.c @@ -675,6 +675,7 @@ static int keep_extra_dissection(struct ndpi_detection_module_struct *ndpi_struc if(packet->udp && (ntohs(packet->udp->source) == 3478) + && (packet->payload_packet_len > 0) && (packet->payload[0] != 0x0) && (packet->payload[0] != 0x1)) { if(flow->stun.num_non_stun_pkt < 2) { flow->stun.non_stun_pkt_len[flow->stun.num_non_stun_pkt++] = packet->payload_packet_len;