Skip to content

Commit

Permalink
Numeric truncation at tls.c:1010 (#2005)
Browse files Browse the repository at this point in the history
* fixed numtrunc error in protocols/tls.c

* fixed build error for tls.c
  • Loading branch information
headshog authored Jun 8, 2023
1 parent 436ab54 commit 7dcceb4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/protocols/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 7dcceb4

Please sign in to comment.