Merge pull request #955 from lnslbrty/fix/heap-overflow-thunder

Fixed thunder protocol detection heap overflow caused by missing leng…
This commit is contained in:
Luca Deri
2020-07-08 17:14:45 +02:00
committed by GitHub
+1
View File
@@ -118,6 +118,7 @@ void ndpi_int_search_thunder_tcp(struct ndpi_detection_module_struct
packet->content_line.len == 24 &&
memcmp(packet->content_line.ptr, "application/octet-stream",
24) == 0 && packet->empty_line_position_set < (packet->payload_packet_len - 8)
&& packet->payload_packet_len > (packet->empty_line_position + 5)
&& packet->payload[packet->empty_line_position + 2] >= 0x30
&& packet->payload[packet->empty_line_position + 2] < 0x40
&& packet->payload[packet->empty_line_position + 3] == 0x00