Merge pull request #936 from lnslbrty/fix/h323-off-by-one

Fixed off-by-one error in h323.
This commit is contained in:
Luca Deri
2020-06-28 07:28:55 +02:00
committed by GitHub
3 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct n
NDPI_LOG_DBG2(ndpi_struct, "calculated dport over tcp\n");
/* H323 */
if(packet->payload_packet_len >= 4
if(packet->payload_packet_len > 4
&& (packet->payload[0] == 0x03)
&& (packet->payload[1] == 0x00)) {
struct tpkt *t = (struct tpkt*)packet->payload;
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
HTTP 1 58 1
1 TCP 192.168.1.1:31337 -> 192.168.1.2:80 [proto: 7/HTTP][cat: Web/5][1 pkts/58 bytes -> 0 pkts/0 bytes][Goodput ratio: 7/0][< 1 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]