Warnign fixes
Updated test results
This commit is contained in:
@@ -129,7 +129,7 @@ void ndpi_search_coap (struct ndpi_detection_module_struct *ndpi_struct,
|
||||
// check values in header
|
||||
if(h->version == 1) {
|
||||
if(h->type == CON || h->type == NO_CON || h->type == ACK || h->type == RST ) {
|
||||
if(h->tkl == 0 || h->tkl < 8) {
|
||||
if(h->tkl < 8) {
|
||||
if((h->code >= 0 && h->code <= 5) || (h->code >= 65 && h->code <= 69) ||
|
||||
(h->code >= 128 && h->code <= 134) || (h->code >= 140 && h->code <= 143) ||
|
||||
(h->code >= 160 && h->code <= 165)) {
|
||||
|
||||
@@ -77,7 +77,7 @@ static int ndpi_int_check_mdns_payload(struct ndpi_detection_module_struct
|
||||
char answer[256];
|
||||
int i, j, len;
|
||||
|
||||
for(i=13, j=0; (packet->payload[i] != 0) && (i < packet->payload_packet_len) && (i < (sizeof(answer)-1)); i++)
|
||||
for(i=13, j=0; (i < packet->payload_packet_len) && (i < (sizeof(answer)-1)) && (packet->payload[i] != 0); i++)
|
||||
answer[j++] = (packet->payload[i] < 13) ? '.' : packet->payload[i];
|
||||
|
||||
answer[j] = '\0';
|
||||
|
||||
@@ -559,7 +559,7 @@ static u_int8_t ndpi_search_sslv3_direction1(struct ndpi_detection_module_struct
|
||||
}
|
||||
}
|
||||
|
||||
if((packet->payload_packet_len > temp && packet->payload_packet_len > 100) && packet->payload_packet_len > 9) {
|
||||
if((packet->payload_packet_len > temp) && (packet->payload_packet_len > 100)) {
|
||||
/* the server hello may be split into small packets and the certificate has its own SSL Record
|
||||
* so temp contains only the length for the first ServerHello block */
|
||||
u_int32_t cert_start;
|
||||
|
||||
Reference in New Issue
Block a user