Adds bound check in TLS

This commit is contained in:
Philippe Antoine
2020-04-15 15:42:54 +02:00
parent 81e97d7515
commit 4ec3e6c064
+1 -1
View File
@@ -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) {