Fix buffer overread in ndpi_search_setup_capwap
This commit is contained in:
@@ -66,11 +66,13 @@ static void ndpi_search_setup_capwap(struct ndpi_detection_module_struct *ndpi_s
|
||||
else
|
||||
offset = 15, to_add = 17;
|
||||
|
||||
if (packet->payload_packet_len >= offset + sizeof(u_int16_t)) {
|
||||
msg_len = ntohs(*(u_int16_t*)&packet->payload[offset]);
|
||||
|
||||
if((msg_len+to_add) == packet->payload_packet_len)
|
||||
goto capwap_found;
|
||||
}
|
||||
}
|
||||
|
||||
if(
|
||||
(((dport == NDPI_CAPWAP_DATA_PORT) && (packet->iph->daddr != 0xFFFFFFFF)) || (sport == NDPI_CAPWAP_DATA_PORT))
|
||||
|
||||
Reference in New Issue
Block a user