Skip to content

Commit

Permalink
fix add host detail to report
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Jul 31, 2024
1 parent c38493d commit 3aa9dea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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;
Expand Down

0 comments on commit 3aa9dea

Please sign in to comment.