aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-08-29 18:08:56 +0200
committerLuca Deri <deri@ntop.org>2023-08-29 18:08:56 +0200
commit1de7fd9bf002c3cad58756c9e304b49a9d34978e (patch)
tree872414d11c4bdfcd8595bf29827b09898287853c /src
parent3dbc4f65fc9942378cdf682e9cabb64e586ea73a (diff)
Warning fixes
Diffstat (limited to 'src')
-rw-r--r--src/lib/ndpi_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index d1c4e3746..41e4fb539 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4238,9 +4238,9 @@ int ndpi_load_categories_dir(struct ndpi_detection_module_struct *ndpi_str,
underscore[0] = '\0';
proto_id = (ndpi_protocol_category_t)atoi(dp->d_name);
- if((proto_id > 0) && (proto_id < NDPI_LAST_IMPLEMENTED_PROTOCOL)) {
+ if((proto_id > 0) && (proto_id < (u_int16_t)NDPI_LAST_IMPLEMENTED_PROTOCOL)) {
/* Valid file */
- char path[256];
+ char path[512];
underscore[0] = '_';
snprintf(path, sizeof(path), "%s/%s", dir_path, dp->d_name);