diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-02-16 18:04:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-16 18:04:34 +0100 |
commit | 4075324e2b81c11254a28362942a477594be6b28 (patch) | |
tree | 6d2412efd764f97cfd3bdefd9ee623248b718efb /src/lib/ndpi_utils.c | |
parent | 06d4f8c7e56816d20636dc3838fa3a9825ad2ac8 (diff) |
fuzz: extend fuzz coverage (#1888)
Diffstat (limited to 'src/lib/ndpi_utils.c')
-rw-r--r-- | src/lib/ndpi_utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 27a197d0f..53ed95939 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -91,7 +91,7 @@ _Static_assert(sizeof(struct ndpi_str_hash) == sizeof(struct ndpi_str_hash_priva int ndpi_check_punycode_string(char * buffer , int len) { int i = 0; - while(i++ < len) { + while(i++ < len - 3) { if((buffer[i] == 'x') && (buffer[i+1] == 'n') && (buffer[i+2] == '-') @@ -2717,7 +2717,8 @@ u_int8_t ndpi_is_encrypted_proto(struct ndpi_detection_module_struct *ndpi_str, void ndpi_set_tls_cert_expire_days(struct ndpi_detection_module_struct *ndpi_str, u_int8_t num_days) { - ndpi_str->tls_certificate_expire_in_x_days = num_days; + if(ndpi_str) + ndpi_str->tls_certificate_expire_in_x_days = num_days; } /* ******************************************* */ |