Fix invalid reads and add valgrind test
This commit is contained in:
@@ -484,7 +484,7 @@ static u_int16_t http_request_url_offset(struct ndpi_detection_module_struct *nd
|
||||
packet->payload_packet_len);
|
||||
|
||||
/* Check first char */
|
||||
if(!strchr(http_fs,packet->payload[0])) return 0;
|
||||
if(!packet->payload_packet_len || !strchr(http_fs,packet->payload[0])) return 0;
|
||||
/**
|
||||
FIRST PAYLOAD PACKET FROM CLIENT
|
||||
**/
|
||||
|
||||
@@ -296,7 +296,7 @@ static void ndpi_search_ssh_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
flow->l4.tcp.ssh_stage = 3;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
} else if(packet->payload_packet_len > 5) {
|
||||
u_int8_t msgcode = *(packet->payload + 5);
|
||||
ndpi_MD5_CTX ctx;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user