Adds bound check in TLS
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user