Improved boundary check to prevent overflow
This commit is contained in:
@@ -68,7 +68,7 @@ static void ndpi_search_setup_iax(struct ndpi_detection_module_struct *ndpi_stru
|
||||
|
||||
packet_len = 12;
|
||||
for(i = 0; i < NDPI_IAX_MAX_INFORMATION_ELEMENTS; i++) {
|
||||
if (packet_len >= packet->payload_packet_len)
|
||||
if ((packet_len+1) >= packet->payload_packet_len)
|
||||
break;
|
||||
|
||||
packet_len = packet_len + 2 + packet->payload[packet_len + 1];
|
||||
|
||||
Reference in New Issue
Block a user