Numeric truncation at tls.c:1010 (#2005)

* fixed numtrunc error in protocols/tls.c

* fixed build error for tls.c
This commit is contained in:
headshog
2023-06-08 07:52:18 +02:00
committed by GitHub
parent 436ab54f5a
commit 7dcceb4daf
+3 -2
View File
@@ -1000,7 +1000,8 @@ static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct,
}
while(!something_went_wrong) {
u_int16_t len, p_len;
u_int32_t len;
u_int16_t p_len;
const u_int8_t *p;
u_int8_t content_type;
@@ -1072,7 +1073,7 @@ static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct,
&& (content_type != 0x17 /* Application Data */)
&& (!flow->tls_quic.certificate_processed)) {
/* Split the element in blocks */
u_int16_t processed = 5;
u_int32_t processed = 5;
while((processed+4) <= len) {
const u_int8_t *block = (const u_int8_t *)&message->buffer[processed];