From d27239e953609d9081f43dc56075b2aa2f294a09 Mon Sep 17 00:00:00 2001 From: mzack Date: Mon, 20 Dec 2021 12:17:04 +0100 Subject: [PATCH] Fixing CVE annotate crash --- v2/cmd/cve-annotate/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/cmd/cve-annotate/main.go b/v2/cmd/cve-annotate/main.go index c2ccaa76..3e21fe94 100644 --- a/v2/cmd/cve-annotate/main.go +++ b/v2/cmd/cve-annotate/main.go @@ -71,7 +71,7 @@ func getCVEData(client *nvd.Client, filePath, data string) { cveName := matches[0][1] severityMatches := severityRegex.FindAllStringSubmatch(data, 1) - if len(matches) == 0 { + if len(severityMatches) == 0 { return } severityValue := severityMatches[0][1]