Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent CPE/NVD_ID from being "(null)" #1369

Merged
merged 4 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Check db version before creating SQL functions [#1304](https://github.com/greenbone/gvmd/pull/1304)
- Fix severity_in_level SQL function [#1312](https://github.com/greenbone/gvmd/pull/1312)
- Fix and simplify SecInfo migration [#1331](https://github.com/greenbone/gvmd/pull/1331)
- Prevent CPE/NVD_ID from being "(null)" [#1369](https://github.com/greenbone/gvmd/pull/1369)

### Removed
- Remove solution element from VT tags [#886](https://github.com/greenbone/gvmd/pull/886)
Expand Down
9 changes: 6 additions & 3 deletions src/gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -13259,11 +13259,14 @@ handle_get_info (gmp_parser_t *gmp_parser, GError **error)
"<score>%d</score>"
"<cve_refs>%s</cve_refs>"
"<status>%s</status>",
cpe_info_iterator_nvd_id (&info),
cpe_info_iterator_nvd_id (&info)
? cpe_info_iterator_nvd_id (&info)
: "",
cpe_info_iterator_score (&info),
cpe_info_iterator_cve_refs (&info),
cpe_info_iterator_status (&info) ?
cpe_info_iterator_status (&info) : "");
cpe_info_iterator_status (&info)
? cpe_info_iterator_status (&info)
: "");

if (get_info_data->details == 1)
{
Expand Down