Skip to content

Commit

Permalink
Fix: Test if location is null in cve_scan_host to prevent an assertio…
Browse files Browse the repository at this point in the history
…n error

Merge pull request #1709 from jhelmold/cve_scan_status_interrupted
  • Loading branch information
timopollmeier committed Oct 26, 2021
2 parents 3dc4a94 + 74d83e4 commit 1a54ae4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -3121,6 +3121,13 @@ cve_scan_host (task_t task, report_t report, gvm_host_t *gvm_host)
const char *location;
location = app_locations_iterator_location (&locations_iter);

if (location == NULL)
{
g_warning ("%s: Location is null for ip %s, app %s",
__func__, ip, app);
continue;
}

if (locations->len)
g_string_append (locations, ", ");
g_string_append (locations, location);
Expand Down

0 comments on commit 1a54ae4

Please sign in to comment.