From 3aa9dea4190e6add0672280cf72af5f7e96143fa Mon Sep 17 00:00:00 2001 From: Juan Jose Nicola Date: Wed, 31 Jul 2024 12:01:21 -0300 Subject: [PATCH] fix add host detail to report --- src/manage_sql.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/manage_sql.c b/src/manage_sql.c index f3fb76fd7..848581bc2 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -59326,7 +59326,8 @@ add_openvasd_result_to_report (openvasd_result_t res, gpointer *results_aux) host = res->ip_address; hostname = res->hostname; - if (res->port == 0 && res->detail_value && *res->detail_value) + if (res && res->port == 0 && !strcmp (type, "host_detail") && + res->detail_value && *res->detail_value) port = g_strdup ("general/Host_Details"); else if (res->port > 0) { @@ -59350,6 +59351,7 @@ add_openvasd_result_to_report (openvasd_result_t res, gpointer *results_aux) "Openvasd Host Detail", res->detail_name, res->detail_value, hash_value); } + desc = res->message; g_free (hash_value); g_free (port); return;