aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-04-22 18:52:36 +0200
committerLuca Deri <deri@ntop.org>2020-04-22 18:52:36 +0200
commit0b702c20d32c4fab113f5c3da7e503f7fd1a9ec5 (patch)
tree73a8145fdd0dcda931b7151e070f8e6faea989b5
parent473a5d1d0b7a7d5cb18b1ce60c31176e23cee9ad (diff)
Warning fix
-rw-r--r--src/lib/ndpi_main.c2
-rw-r--r--src/lib/protocols/tls.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index cb1f951ac..01c5287e6 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4213,7 +4213,7 @@ ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_st
As Google has recently introduced Duo,
we need to distinguish between it and hangout
thing that should be handled by the STUN dissector
- */
+ */
ret.app_protocol = NDPI_PROTOCOL_HANGOUT_DUO;
}
}
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c
index a6d7883ce..d35b6031a 100644
--- a/src/lib/protocols/tls.c
+++ b/src/lib/protocols/tls.c
@@ -318,7 +318,7 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi
/* The check "len > sizeof(dNSName) - 1" will be always false. If we add it,
the compiler is smart enough to detect it and throws a warning */
- if((len == 0 /* Looks something went wrong */))
+ if(len == 0 /* Looks something went wrong */)
break;
strncpy(dNSName, (const char*)&packet->payload[i], len);
@@ -1111,17 +1111,17 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
#ifdef DEBUG_TLS
printf("Client SSL [TLS version len: %u]\n", version_len);
#endif
-
+
if(version_len == (extension_len-1)) {
u_int8_t j;
s_offset++;
-
+
// careful not to overflow and loop forever with u_int8_t
for(j=0; j+1<version_len; j += 2) {
u_int16_t tls_version = ntohs(*((u_int16_t*)&packet->payload[s_offset+j]));
u_int8_t unknown_tls_version;
-
+
#ifdef DEBUG_TLS
printf("Client SSL [TLS version: %s/0x%04X]\n",
ndpi_ssl_version2str(tls_version, &unknown_tls_version), tls_version);
@@ -1143,7 +1143,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
}
}
-
+
extension_offset += extension_len;
#ifdef DEBUG_TLS