Skip to content

Commit

Permalink
Check for '' where before checked for 'NOCVE'.
Browse files Browse the repository at this point in the history
Since the term "NOCVE" does not exist anymore,
we need to chec for an empty field rather this special
keyword.
  • Loading branch information
janowagner committed May 7, 2019
1 parent 4c8b26c commit 34e3676
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/manage_pg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3084,7 +3084,7 @@ create_tables ()
" (SELECT id FROM nvts"
" WHERE oid = results.nvt"
" AND"
" (cve = 'NOCVE'"
" (cve = ''"
" OR cve NOT IN (SELECT cve FROM nvts"
" WHERE oid"
" IN (SELECT source_name"
Expand All @@ -3110,7 +3110,7 @@ create_tables ()
" (SELECT id FROM nvts AS outer_nvts"
" WHERE oid = results.nvt"
" AND"
" (cve = 'NOCVE'"
" (cve = ''"
" OR NOT EXISTS"
" (SELECT cve FROM nvts"
" WHERE oid IN (SELECT source_name"
Expand Down
4 changes: 2 additions & 2 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -25325,7 +25325,7 @@ init_report_host_details_iterator (iterator_t* iterator,
" UNION SELECT 0, 'Closed CVE', cve, 'openvasmd', oid,"
" nvts.name, cvss_base"
" FROM nvts, report_host_details"
" WHERE cve != 'NOCVE'"
" WHERE cve != ''"
" AND family IN (" LSC_FAMILY_LIST ")"
" AND nvts.oid = report_host_details.source_name"
" AND report_host = %llu"
Expand Down Expand Up @@ -28389,7 +28389,7 @@ static int
report_closed_cve_count (report_t report)
{
return sql_int (" SELECT count(id) FROM nvts"
" WHERE cve != 'NOCVE'"
" WHERE cve != ''"
" AND family IN (" LSC_FAMILY_LIST ")"
" AND oid IN"
" (SELECT source_name FROM report_host_details"
Expand Down
4 changes: 2 additions & 2 deletions src/manage_sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -4009,7 +4009,7 @@ create_tables ()
" (SELECT id FROM nvts"
" WHERE oid = results.nvt"
" AND"
" (cve = 'NOCVE'"
" (cve = ''"
" OR cve NOT IN (SELECT cve FROM nvts"
" WHERE oid IN (SELECT source_name"
" FROM report_host_details"
Expand All @@ -4033,7 +4033,7 @@ create_tables ()
" (SELECT id FROM nvts AS outer_nvts"
" WHERE oid = results.nvt"
" AND"
" (cve = 'NOCVE'"
" (cve = ''"
" OR NOT EXISTS"
" (SELECT cve FROM nvts"
" WHERE oid IN (SELECT source_name"
Expand Down

0 comments on commit 34e3676

Please sign in to comment.