Bug fix (missing check)

This commit is contained in:
Luca Deri 2023-10-07 10:24:39 +02:00
parent e93d92c9b7
commit 6d54366ff9

View file

@ -483,16 +483,19 @@ end
-- Function to format cve list with scores
local function get_cve_with_score(cve)
local cve_with_score_list = {}
for _,cve_id in ipairs(cve) do
local score = cve_utils.getCVEscore(cve_id)
local cve_formatted = cve
if(score ~= nil) then
cve_formatted = string.format("%s|%s",cve_id,score)
if(cve ~= nil) then
for _,cve_id in ipairs(cve) do
local score = cve_utils.getCVEscore(cve_id)
local cve_formatted = cve
if(score ~= nil) then
cve_formatted = string.format("%s|%s",cve_id,score)
end
cve_with_score_list[#cve_with_score_list+1] = cve_formatted
end
cve_with_score_list[#cve_with_score_list+1] = cve_formatted
end
return cve_with_score_list
end