From 85776a532d0d7785c6be844d8318efca31fc5dcd Mon Sep 17 00:00:00 2001 From: Derrick Lyndon Pallas Date: Fri, 5 Apr 2019 18:58:46 +0000 Subject: Fix double-strdup memory leak in ndpi_handle_rule proto is being strdup'd both in the call to ndpi_set_proto_defaults and inside of that function as well, leaking the memory. --- src/lib/ndpi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/ndpi_main.c') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index bdd28f666..e18c220a5 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -2837,7 +2837,7 @@ int ndpi_handle_rule(struct ndpi_detection_module_struct *ndpi_mod, ndpi_mod->ndpi_num_supported_protocols, 0 /* can_have_a_subprotocol */, no_master, no_master, - ndpi_strdup(proto), + proto, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, /* TODO add protocol category support in rules */ ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */, ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */); -- cgit v1.2.3 From 3979c28cacb6ae113de2a0edfbadb6e3fa001947 Mon Sep 17 00:00:00 2001 From: lucaderi Date: Mon, 3 Jun 2019 19:50:18 +0200 Subject: Added missing antimalware category --- src/lib/ndpi_main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib/ndpi_main.c') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 7a954a710..4bc89fb6e 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -425,6 +425,7 @@ static const char* categories[] = { "Banned_Site", "Site_Unavailable", "Allowed_Site", + "Antimalware", }; /* ****************************************** */ -- cgit v1.2.3