diff options
-rw-r--r-- | fuzz/fuzz_filecfg_categories.c | 2 | ||||
-rw-r--r-- | fuzz/fuzz_filecfg_protocols.c | 2 | ||||
-rw-r--r-- | src/include/ndpi_api.h | 6 | ||||
-rw-r--r-- | src/lib/ndpi_main.c | 10 |
4 files changed, 10 insertions, 10 deletions
diff --git a/fuzz/fuzz_filecfg_categories.c b/fuzz/fuzz_filecfg_categories.c index d2e43c99c..8b39d714f 100644 --- a/fuzz/fuzz_filecfg_categories.c +++ b/fuzz/fuzz_filecfg_categories.c @@ -35,7 +35,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ndpi_set_debug_bitmask(ndpi_struct, debug_bitmask); fd = buffer_to_file(data, size); - ndpi_load_categories_file2(ndpi_struct, fd, NULL); + ndpi_load_categories_file_fd(ndpi_struct, fd, NULL); if(fd) fclose(fd); diff --git a/fuzz/fuzz_filecfg_protocols.c b/fuzz/fuzz_filecfg_protocols.c index 6731b7af9..efc9cf0ec 100644 --- a/fuzz/fuzz_filecfg_protocols.c +++ b/fuzz/fuzz_filecfg_protocols.c @@ -35,7 +35,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ndpi_set_debug_bitmask(ndpi_struct, debug_bitmask); fd = buffer_to_file(data, size); - ndpi_load_protocols_file2(ndpi_struct, fd); + ndpi_load_protocols_file_fd(ndpi_struct, fd); if(fd) fclose(fd); diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index ee77b537a..d7bb344ab 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -766,8 +766,8 @@ extern "C" { */ int ndpi_load_protocols_file(struct ndpi_detection_module_struct *ndpi_mod, const char* path); - int ndpi_load_protocols_file2(struct ndpi_detection_module_struct *ndpi_mod, - FILE *fd); + int ndpi_load_protocols_file_fd(struct ndpi_detection_module_struct *ndpi_mod, + FILE *fd); /** * Add an IP-address based risk mask @@ -810,7 +810,7 @@ extern "C" { * -1 else */ int ndpi_load_categories_file(struct ndpi_detection_module_struct *ndpi_str, const char* path, void *user_data); - int ndpi_load_categories_file2(struct ndpi_detection_module_struct *ndpi_str, FILE *fd, void *user_data); + int ndpi_load_categories_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd, void *user_data); /** * Loads a file (separated by <cr>) of domain names associated with the specified category diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index a0fb3a1a6..4a42a5112 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -4415,15 +4415,15 @@ int ndpi_load_categories_file(struct ndpi_detection_module_struct *ndpi_str, return -1; } - rc = ndpi_load_categories_file2(ndpi_str, fd, user_data); + rc = ndpi_load_categories_file_fd(ndpi_str, fd, user_data); fclose(fd); return rc; } -int ndpi_load_categories_file2(struct ndpi_detection_module_struct *ndpi_str, - FILE *fd, void *user_data) { +int ndpi_load_categories_file_fd(struct ndpi_detection_module_struct *ndpi_str, + FILE *fd, void *user_data) { char buffer[512], *line, *name, *category, *saveptr; int len, num = 0; @@ -4801,14 +4801,14 @@ int ndpi_load_protocols_file(struct ndpi_detection_module_struct *ndpi_str, cons return -1; } - rc = ndpi_load_protocols_file2(ndpi_str, fd); + rc = ndpi_load_protocols_file_fd(ndpi_str, fd); fclose(fd); return rc; } -int ndpi_load_protocols_file2(struct ndpi_detection_module_struct *ndpi_str, FILE *fd) { +int ndpi_load_protocols_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd) { char *buffer, *old_buffer; int chunk_len = 1024, buffer_len = chunk_len, old_buffer_len; int i; |