aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/kakaotalk_voice.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2015-06-19 15:59:46 +0200
committerLuca Deri <deri@ntop.org>2015-06-19 15:59:46 +0200
commitd04979402c200a9448789582685c6df4d5f364eb (patch)
tree4057b53557bbfce5f3146a14e7e8bdf61ad4a27d /src/lib/protocols/kakaotalk_voice.c
parent8a2493c26aa9f82832abf64f5e6306ef46c4a221 (diff)
Added further check
Diffstat (limited to 'src/lib/protocols/kakaotalk_voice.c')
-rw-r--r--src/lib/protocols/kakaotalk_voice.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/protocols/kakaotalk_voice.c b/src/lib/protocols/kakaotalk_voice.c
index 94ea2680d..696165817 100644
--- a/src/lib/protocols/kakaotalk_voice.c
+++ b/src/lib/protocols/kakaotalk_voice.c
@@ -33,7 +33,10 @@ void ndpi_search_kakaotalk_voice(struct ndpi_detection_module_struct *ndpi_struc
unsigned char *vers;
int ver_offs;
- if(packet->iph && (packet->udp != NULL)) {
+ if(packet->iph
+ && packet->udp
+ && (packet->payload_packet_len > 0)
+ ) {
if((packet->payload[0] == 0x81)
|| (packet->payload[1] == 0xC8)
|| (packet->payload[2] == 0x00)