Skip to content

Commit

Permalink
Adds bound check in TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber committed Apr 15, 2020
1 parent 81e97d7 commit 4ec3e6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/protocols/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4ec3e6c

Please sign in to comment.