diff options
author | Luca Deri <deri@ntop.org> | 2019-07-01 23:16:43 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2019-07-01 23:16:43 +0200 |
commit | 9590b18fdd0868c81271b330b766dc28083d1a60 (patch) | |
tree | 0b5ce6a10cf8e94f4fecbdc6997ea21c73114ffa /src | |
parent | 7cb7a12f968d863f2b8ce5f1eb3d9d52fefa3101 (diff) |
Fixed invalid changes in ndpi_get_proto_category() and ndpi_get_proto_name() dur to https://github.com/ntop/nDPI/pull/731/commits/4b717276614e20feada22e6fe29ea2099ba9fd37
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ndpi_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 3cf0f3d1e..00dec6eef 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -5688,7 +5688,7 @@ ndpi_protocol_category_t ndpi_get_proto_category(struct ndpi_detection_module_st char* ndpi_get_proto_name(struct ndpi_detection_module_struct *ndpi_mod, u_int16_t proto_id) { if((proto_id >= ndpi_mod->ndpi_num_supported_protocols) - || (proto_id < (NDPI_MAX_SUPPORTED_PROTOCOLS+NDPI_MAX_NUM_CUSTOM_PROTOCOLS)) + || (proto_id >= (NDPI_MAX_SUPPORTED_PROTOCOLS+NDPI_MAX_NUM_CUSTOM_PROTOCOLS)) || (ndpi_mod->proto_defaults[proto_id].protoName == NULL)) proto_id = NDPI_PROTOCOL_UNKNOWN; @@ -5700,7 +5700,7 @@ char* ndpi_get_proto_name(struct ndpi_detection_module_struct *ndpi_mod, u_int16 ndpi_protocol_breed_t ndpi_get_proto_breed(struct ndpi_detection_module_struct *ndpi_mod, u_int16_t proto_id) { if((proto_id >= ndpi_mod->ndpi_num_supported_protocols) - || (proto_id < (NDPI_MAX_SUPPORTED_PROTOCOLS+NDPI_MAX_NUM_CUSTOM_PROTOCOLS)) + || (proto_id >= (NDPI_MAX_SUPPORTED_PROTOCOLS+NDPI_MAX_NUM_CUSTOM_PROTOCOLS)) || (ndpi_mod->proto_defaults[proto_id].protoName == NULL)) proto_id = NDPI_PROTOCOL_UNKNOWN; |