From 76f74540497535373ac3fe6069faef4011cee025 Mon Sep 17 00:00:00 2001 From: theirix Date: Wed, 17 Aug 2016 14:15:36 +0300 Subject: Fixed drda loop logic --- src/lib/protocols/drda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/protocols') diff --git a/src/lib/protocols/drda.c b/src/lib/protocols/drda.c index 052dad8f0..fe75379ff 100644 --- a/src/lib/protocols/drda.c +++ b/src/lib/protocols/drda.c @@ -52,7 +52,7 @@ void ndpi_search_drda(struct ndpi_detection_module_struct *ndpi_struct, u_int16_t len = ntohs(drda->length); /* check first header */ - if(len != ntohs(drda->length2) + 6 && + if(len != ntohs(drda->length2) + 6 || drda->magic != 0xd0) goto no_drda; @@ -67,7 +67,7 @@ void ndpi_search_drda(struct ndpi_detection_module_struct *ndpi_struct, drda = (struct ndpi_drda_hdr *)(packet->payload + count); len = ntohs(drda->length); - if(len != ntohs(drda->length2) + 6 && + if(len != ntohs(drda->length2) + 6 || drda->magic != 0xd0) goto no_drda; -- cgit v1.2.3