Skip to content

Commit

Permalink
Merge pull request #1687 from timopollmeier/fix-report-import
Browse files Browse the repository at this point in the history
Fix import of report results / errors without host
  • Loading branch information
jhelmold authored Sep 20, 2021
2 parents 5f13ef5 + c308600 commit cc20af4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Fix resume task. [#1679](https://github.com/greenbone/gvmd/pull/1679)
- Added a dedicated error message for the create ticket dialogue when the create permission permission is missing [#1686](https://github.com/greenbone/gvmd/pull/1686)
- Fix import of report results / errors without host [#1687](https://github.com/greenbone/gvmd/pull/1687)

[Unreleased]: https://github.com/greenbone/gvmd/compare/v21.4.3...HEAD

Expand Down
5 changes: 3 additions & 2 deletions src/gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -18169,8 +18169,9 @@ gmp_xml_handle_result ()
// https://www.freebsd.org/cgi/man.cgi?query=strcspn&sektion=3
// strcspn returns the number of chars spanned so it should be safe
// without double checking.
create_report_data
->result_host[strcspn (create_report_data->result_host, "\n")] = 0;
if (create_report_data->result_host)
create_report_data
->result_host[strcspn (create_report_data->result_host, "\n")] = 0;
result->host = create_report_data->result_host;
result->hostname = create_report_data->result_hostname;
result->nvt_oid = create_report_data->result_nvt_oid;
Expand Down

0 comments on commit cc20af4

Please sign in to comment.