Fix for invalid boundary check

This commit is contained in:
Luca Deri
2020-07-17 23:26:28 +02:00
parent 64fb40d21e
commit f452dabd92
+1 -1
View File
@@ -922,7 +922,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
for(i=0; i<extension_len; ) {
u_int16_t extension_id, extension_len;
if(offset >= (packet->payload_packet_len+4)) break;
if((offset+4) > packet->payload_packet_len) break;
extension_id = ntohs(*((u_int16_t*)&packet->payload[offset]));
extension_len = ntohs(*((u_int16_t*)&packet->payload[offset+2]));