H323: fix a use-after-poison error (#1412)
Detected by oss-fuzz See: https://oss-fuzz.com/testcase-detail/6730505580576768 Fix a function prototype Update a unit test results
This commit is contained in:
@@ -118,7 +118,7 @@ extern "C" {
|
||||
void ndpi_free(void *ptr);
|
||||
void * ndpi_flow_malloc(size_t size);
|
||||
void ndpi_flow_free(void *ptr);
|
||||
u_int32_t ndpi_get_tot_allocated_memory();
|
||||
u_int32_t ndpi_get_tot_allocated_memory(void);
|
||||
|
||||
/**
|
||||
* Search the first occurrence of substring -find- in -s-
|
||||
|
||||
+1
-1
@@ -2509,7 +2509,7 @@ static void ndpi_add_domain_risk_exceptions(struct ndpi_detection_module_struct
|
||||
ndpi_risk mask = ((ndpi_risk)-1);
|
||||
|
||||
for(i=0; risks_to_mask[i] != NDPI_NO_RISK; i++)
|
||||
mask &= ~(1UL << risks_to_mask[i]);
|
||||
mask &= ~(1ULL << risks_to_mask[i]);
|
||||
|
||||
for(i=0; domains[i] != NULL; i++)
|
||||
ndpi_add_host_risk_mask(ndpi_str, (char*)domains[i], mask);
|
||||
|
||||
@@ -94,7 +94,7 @@ void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct n
|
||||
}
|
||||
/* H323 */
|
||||
if(sport == 1719 || dport == 1719) {
|
||||
if((packet->payload_packet_len >= 5)
|
||||
if((packet->payload_packet_len > 5)
|
||||
&& (packet->payload[0] == 0x16)
|
||||
&& (packet->payload[1] == 0x80)
|
||||
&& (packet->payload[4] == 0x06)
|
||||
|
||||
Reference in New Issue
Block a user