fix new cve contents (#735)

This commit is contained in:
sadayuki-matsuno
2018-11-15 13:43:06 +09:00
committed by Kota Kanbe
parent 98c5421edc
commit 76037cdf72
2 changed files with 8 additions and 1 deletions

View File

@@ -115,7 +115,11 @@ func (deb Debian) FillWithGost(driver db.DB, r *models.ScanResult) (nCVEs int, e
for _, cve := range p.cves {
v, ok := r.ScannedCves[cve.CveID]
if ok {
v.CveContents[models.DebianSecurityTracker] = cve
if v.CveContents == nil {
v.CveContents = models.NewCveContents(cve)
} else {
v.CveContents[models.DebianSecurityTracker] = cve
}
} else {
v = models.VulnInfo{
CveID: cve.CveID,