aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/tls.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2021-11-02 22:08:15 +0100
committerGitHub <noreply@github.com>2021-11-02 22:08:15 +0100
commit55880e4ae4cb651f54a9531ba9732977d9dd517f (patch)
tree4a8e0e4226dd3c237baa68b4749c75ac2b4d0967 /src/lib/protocols/tls.c
parent1f6c94e6630e54c1dc3c8d2e7d6af16712f10cbd (diff)
TLS: fix two warnings (#1365)
Disable unit tests on CI for big-endian target. We know we have multiple issues on big-endian architectures (see #1312) and so the unit tests always fail there. Ignore this error for the time being and let the CI pass if we don't have other issues. Remove an unused automa definition
Diffstat (limited to 'src/lib/protocols/tls.c')
-rw-r--r--src/lib/protocols/tls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c
index 301ea1937..5b2941405 100644
--- a/src/lib/protocols/tls.c
+++ b/src/lib/protocols/tls.c
@@ -1783,7 +1783,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
#endif
if((s_offset+extension_len-2) <= total_len) {
- for(i=0; i<extension_len-2 && s_offset + i + 1 < total_len; i += 2) {
+ for(i=0; i<(u_int32_t)extension_len-2 && s_offset + i + 1 < total_len; i += 2) {
u_int16_t s_group = ntohs(*((u_int16_t*)&packet->payload[s_offset+i]));
#ifdef DEBUG_TLS
@@ -1814,7 +1814,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
printf("Client TLS [EllipticCurveFormat: len=%u]\n", extension_len);
#endif
if((s_offset+extension_len-1) <= total_len) {
- for(i=0; i<extension_len-1 && s_offset+i < total_len; i++) {
+ for(i=0; i<(u_int32_t)extension_len-1 && s_offset+i < total_len; i++) {
u_int8_t s_group = packet->payload[s_offset+i];
#ifdef DEBUG_TLS