Skip to contentSkip to conversation

cve-update-db-native: fix DB file version for '-'

PATCH New Lee Chee Yang 1 participant 1 message Apr 2, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cve-update-db-native: fix DB file version for '-'

From: Lee Chee Yang <[email protected]>

fix logic for CVE DB update so that when the CPE version is '-', it keeps the version as '-' in the DB file too and leave other operation as blank.

---
 meta/recipes-core/meta/cve-update-db-native.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/meta/cve-update-db-native.bb +3 -0
index 497d957..f27ade4 100644
@@ -138,6 +138,9 @@ def parse_node_and_insert(c, node, cveId):
             if version != '*' and version != '-':
                 # Version is defined, this is a '=' match
                 yield [cveId, vendor, product, version, '=', '', '']
+            elif version == '-':
+                # no version information is available
+                yield [cveId, vendor, product, version, '', '', '']
             else:
                 # Parse start version, end version and operators
                 op_start = ''
Signature · 1 line
2.7.4