aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-07-17 23:26:28 +0200
committerLuca Deri <deri@ntop.org>2020-07-17 23:26:28 +0200
commitf452dabd929a18304c3d84c02d24dc9e9245fded (patch)
tree74e1ac4c7762b160e9cece91b5d69e2c759d1a93 /src
parent64fb40d21ed81acadd5bd51fc68924b6e37135c6 (diff)
Fix for invalid boundary check
Diffstat (limited to 'src')
-rw-r--r--src/lib/protocols/tls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c
index d938d53e9..ed0823547 100644
--- a/src/lib/protocols/tls.c
+++ b/src/lib/protocols/tls.c
@@ -922,7 +922,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
for(i=0; i<extension_len; ) {
u_int16_t extension_id, extension_len;
- if(offset >= (packet->payload_packet_len+4)) break;
+ if((offset+4) > packet->payload_packet_len) break;
extension_id = ntohs(*((u_int16_t*)&packet->payload[offset]));
extension_len = ntohs(*((u_int16_t*)&packet->payload[offset+2]));