diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2020-04-15 18:05:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 18:05:16 +0200 |
commit | f4c24663fc651904e325aa944bf5a30def726c6a (patch) | |
tree | b890107aba3e3b0f2f27694f3a808ce9cc0ebc8b /src/lib/protocols/tls.c | |
parent | 9f2dabbda469ca3853f3bb7191e74b3f4d47b48c (diff) | |
parent | 4f370fe7c49cb38125cff2a1411261011e433c94 (diff) |
Merge pull request #874 from catenacyber/fuzz6fix
Fuzz6fix
Diffstat (limited to 'src/lib/protocols/tls.c')
-rw-r--r-- | src/lib/protocols/tls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 77d69a6fe..560e483ac 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -1069,7 +1069,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, s_offset += 2; tot_alpn_len += s_offset; - while(s_offset < tot_alpn_len) { + while(s_offset < tot_alpn_len && s_offset < total_len) { u_int8_t alpn_i, alpn_len = packet->payload[s_offset++]; if((s_offset + alpn_len) <= tot_alpn_len) { @@ -1105,7 +1105,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, u_int8_t version_len = packet->payload[s_offset]; char version_str[256]; u_int8_t version_str_len = 0; - + version_str[0] = 0; #ifdef DEBUG_TLS printf("Client SSL [TLS version len: %u]\n", version_len); #endif |