diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-01-29 09:18:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-29 09:18:32 +0100 |
commit | 0c70411b1b093279f3d7c09b2b57b491911df84c (patch) | |
tree | 993145c834d91aae2cd72044ae940f77557cf713 /src/lib/protocols/tls.c | |
parent | 86b97ffb73edc0965ee1784c8182e715c2d932e3 (diff) |
Make some protocols more "big-endian" friendly (#1402)
See #1312
Diffstat (limited to 'src/lib/protocols/tls.c')
-rw-r--r-- | src/lib/protocols/tls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 1eefe2d0f..95ae13b0e 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -978,7 +978,7 @@ static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct, } else if(len > 5 /* Minimum block size */) { /* Process element as a whole */ if(content_type == 0x17 /* Application Data */) { - u_int32_t block_len = ntohs((flow->l4.tcp.tls.message.buffer[3] << 16) + (flow->l4.tcp.tls.message.buffer[4] << 8)); + u_int32_t block_len = (flow->l4.tcp.tls.message.buffer[3] << 8) + (flow->l4.tcp.tls.message.buffer[4]); /* Let's do a quick check to make sure this really looks like TLS */ if(block_len < 16384 /* Max TLS block size */) |